cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <div class="container">
  <p class="cta-scroll-down">
    <span>Scroll down!</span>
    <i class="fa fa-chevron-circle-down" aria-hidden="true"></i>
  </p>
  <div class="child">
    <p>
      <i class="fa fa-microphone" aria-hidden="true"></i></p>
    <h2><a href="">Microphone</a></h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa nam nemo fuga deserunt, similique ducimus et quos voluptates, mollitia enim saepe inventore tempora quas at minima distinctio vitae tempore id.</p>
    <p>
      <a href="#">Read More &raquo;</a>
    </p>
  </div>
  <div class="child">
    <p>
      <i class="fa fa-clock-o" aria-hidden="true"></i></p>
    <h2><a href="">Alarm Clock</a></h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa nam nemo fuga deserunt, similique ducimus et quos voluptates, mollitia enim saepe inventore tempora quas at minima distinctio vitae tempore id.</p>
    <p>
      <a href="#">Read More &raquo;</a>
    </p>
  </div>
</div>
            
          
!
            
              //Globals ......
  
//-------------- Decoration styling --------------
//-------------- Decoration styling --------------
//-------------- Decoration styling --------------
*{
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;

	/* Adding some smooth transition */
	-webkit-transition: all 0.3s ease-out;  
	-moz-transition: all 0.3s ease-out;
	-ms-transition: all 0.3s ease-out;
	-o-transition: all 0.3s ease-out;
	transition: all 0.3s ease-out;
}

body{
	font-family: 'Raleway', sans-serif;
	font-size: 16px;
	line-height: 1.25em;
}

h2, p{
  margin-bottom: 1em;
  max-width: 450px;
}
.container, .child{
  // padding: 20px;
  text-align: center;
  background: #ccc;
  h2{
    font-size: 1.5em;
  }
  img{
    margin-bottom: 0.5em;
  }
}
.child{
  .fa{
    font-size: 8em;
  }
    color: #fff;
  a{
    color: #fff;
  }
}
.cta-scroll-down{
  position: fixed;
  z-index: 30;
  bottom: 2em;
  right: 30px;
  i, span{
    display: block;
    color: #EA1D62;
  }
  i{
    font-size: 2em;
  }
}
.child:nth-of-type(1){
  position: relative;
  background-size: cover;
      background-image: url(https://images.unsplash.com/photo-1471039497385-b6d6ba609f9c?ixlib=rb-0.3.5…crop=entropy&cs=tinysrgb&w=1080&fit=max&s=111e2905f1583c16ed5a7479df432e0e);
  &:after{
    content: '';
    position: absolute;
    width:100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
  }
  p, h2 {
    position: relative;
    z-index: 2;
  }
}
.child:nth-of-type(2){
  background: #EA1D62;
}

//-------------- Decoration styling --------------
//-------------- Decoration styling --------------
//-------------- Decoration styling --------------






/* 
 * MOBILE FIRST (SMALL SCREENS)
 * Display flexbox items in a column 
 * ---------------------------------
*/
.container{
  display: flex; //initiate as a flexbox
  //Having each flex-item to have a nicely centered content (for a good presentation)
  .child{ 
    display: flex; //flex items also need to be displayed as flexboxes
    flex-direction: column; //in order for their element to be stacked in column
    //and centered vertically and horizontally
    align-items: center; //horizontal align center
    justify-content: center; //vertical align center
    height: 100vh; //height occupy the viewport's height
  }
  
  //MOBILE FIRST (SMALL SCREENS) ...
  height: 200vh; //height occupy twice of viewport's height to display each split-screen one at the time 
  flex-direction: column; //Display flex-items in a column (they'll automatically span 100% of the viewport) ...
   
  //LARGER SCREENS ...
  //Display flex-items in a row ...
  @media (min-width:50em){
    flex-direction: row;
    flex-wrap: nowrap;
    height: 100vh; //height occupy 100% of viewport's height
    .child{
      padding: 1em;
      height: 100vh; 
      //It does matter "flex-wrap: nowrap" will 
      //force the children to fit the screen
      width: 100%; 
    }
    .cta-scroll-down{
      display:none;
    }
  }
}

            
          
!
999px
Loading ..................

Console