Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                  <div id="app"></div>

              
            
!

CSS

              
                $color-bg: #ffffff;
$color-black: #222;
$color-grey: #444;
$color-yellow: #ffe23f;
$base_font: Lato, sans-serif;
  /* Colors */
$dark_blue:rgb(21, 21, 33);
  /* Order form variables*/
$form_blue:#151B21;
$form_text_shadow: 0 0 7px 0 rgba(255, 70, 89, 0.6);


.about {
  padding: 100px 0;
  position: relative;
  text-align: center;
  background: #F9FAFC;
  &.fixed {
    //top: 0;
    //width: 100%;
    //position: fixed;
    //height: 100%;
  }
  &__content {
    position: relative;
    text-align: center;
  }

  &__title {
    margin-bottom: 90px;
  }

  &__body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }
  .service-logo{
    max-width: 50%;
    text-align: left;
    flex-basis: 50%;
    position: relative;
  }
  .pointer{
    position: absolute;
    top: 50%;

    &--first {
      left: -2%;
    }

    &--second {
      left: 25%;
    }

    &--third {
      left: 65%;
    }

  }
  .services-type {
    align-self: flex-start;
    width: 100%;
    height: auto;
    max-height: 150px;
    max-width: 400px;
    display: inline-block;
    margin: 0;
    text-align: left;

    &__title {
      margin: 0;
      color:$dark_blue;
      font-size: 25px;
      line-height: 30px;
    }

    &__description {
      color:$dark_blue;
      font-size: 18px;
      font-weight: 500;
      line-height: 36px;
    }
  }

  .services-type__item {
    display: none;

    &--active {
      display: block;
    }
  }
  .services-icons{
    margin-left: 100px;
    width: 100%;
    text-align: left;
  }
  .icon {
    display: inline-block;
    height: 165px;
    width: 165px;
    max-width: 165px;
    border-radius: 50px;
    background-color: #FFFFFF;
    box-shadow: 0 21px 81px 0 rgba(199, 200, 230, 0.7);

    &--main {
      margin: 0 0 200px 100px;
      text-align: center;
    }

    &--child:not(:last-child) {
      margin-right: 130px;
    }
  }

}


              
            
!

JS

              
                const isInViewport = elem => {
	const distance = elem.getBoundingClientRect()
	return (
		distance.top >= 0 &&
		distance.left >= 0 &&
		distance.bottom <=
			(window.innerHeight || document.documentElement.clientHeight) &&
		distance.right <=
			(window.innerWidth || document.documentElement.clientWidth)
	)
}

const IntroCard = () => {
  function scrollHandler() {

    if (isInViewport('here will be a ref to .about')) {
    } else {
    }
  }

window.addEventListener('scroll', scrollHandler)

  return (
    <section className="about">
        <div className="about__content">
          <div className="about_header">
            <h2 className="about__title">How it works</h2>
          </div>
          <div className="about__body">
            <div className="service-logo">
              <div className="icon icon--main"/>
              <svg
                fill="001C7A"
                className="pointer pointer--first"
              >
                <defs>
                  <marker
                    id="arrow"
                    markerWidth="7"
                    markerHeight="7"
                    refX="0"
                    refY="3"
                    orient="auto"
                    markerUnits="strokeWidth"
                  >
                    <path d="M0,0 L0,6 L5,3 z" fill="#001C7A"/>
                  </marker>
                </defs>
                <line
                  x1="200"
                  y1="0"
                  x2="200"
                  y2="150"
                  fill="none"
                  stroke="#001C7A"
                  strokeWidth="3"
                  markerEnd="url(#arrow)"
                />
              </svg>
              <svg
                fill="001C7A"
                height="105px"
                width="2px"
                className="pointer pointer--second"
              >
                <path
                  fill="none"
                  stroke="#001C7A"
                  strokeWidth="3"
                  id="triangle"
                  d="M150 0 L245 200  Z"
                />
              </svg>
              <svg
                fill="001C7A"
                height="105px"
                width="2px"
                className="pointer pointer--third"
              >
                <path
                  fill="none"
                  stroke="#001C7A"
                  strokeWidth="3"
                  id="triangle"
                  d="M150 0 L345 200  Z"
                />
              </svg>
            </div>
            <div className="services-type">
              <div className="services-type__item">
                <h3 className="services-type__title">Check for Free</h3>
                <p className="services-type__description">
                  Check your municipality for free with our 10-seconds
                  questionnaire. This will show if containers are allowed,
                  permits required, and available dates. It will also determine
                  what type of service we can provide.
                </p>
              </div>
              <div className="services-type__item services-type__item--active">
                <h3 className="services-type__title">Check for Free</h3>
                <p className="services-type__description">
                  Check your municipality for free with our 10-seconds
                  questionnaire. This will show if containers are allowed,
                  permits required, and available dates. It will also determine
                  what type of service we can provide.
                </p>
              </div>
              <div className="services-type__item">
                <h3 className="services-type__title">Test description</h3>
                <p className="services-type__description">
                  Check your municipality for free with our 10-seconds
                  questionnaire. This will show if containers are allowed,
                  permits required, and available dates. It will also determine
                  what type of service we can provide.
                </p>
              </div>
            </div>
            <div className="services-icons">
              <div className="icon icon--child"/>
              <div className="icon icon--child"/>
              <div className="icon icon--child"/>
            </div>
          </div>
        </div>
    </section>
  )
}


class App extends React.Component {
  constructor(props) {
    super(props);
  }

  render() {
    return (
      <div className="center">
        <IntroCard />
    	</div>)
  }

};

ReactDOM.render(
  <App />,
  document.getElementById('app')
);
              
            
!
999px

Console