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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <section> 
  
  <style>.article_1::after{background-image: url(https://seansmyth.ie/wp-content/uploads/2018/07/Knockanstockan-2018-by-Sean-Smyth-30-7-18-69-of-74-700x456.jpg) !important;}</style>
  
  <article  class="article_1"> 
    <img src="https://seansmyth.ie/wp-content/uploads/2018/07/Knockanstockan-2018-by-Sean-Smyth-30-7-18-69-of-74-700x456.jpg" alt="Tesla model 3" />
    <div>
          <h1>Knockanstockan</h1>

      <p>Nullam id dolor id nibh ultricies vehicula ut id elit. Maecenas sed diam eget risus varius blandit sit amet non magna. Sed posuere consectetur est at lobortis.</p>
      </div>
  </article>
  
  <style>.article_2::after{background-image: url(https://www.tesla.com/sites/default/files/images/model-x/section-hero-background.jpg?20180607) !important;}</style>
  
    <article class="article_2"> 
    <img src="https://www.tesla.com/sites/default/files/images/model-x/section-hero-background.jpg?20180607" alt="Tesla model X" />
    <div>
    <h1>Tesla Model X</h1>
    <p>Model X is the fastest and most capable sport utility vehicle in history. It was also the first SUV to receive a 5-star US NCAP safety rating. With all-wheel drive and a range of 565 kilometers (NEDC), Model X has ample seating for seven adults and all of their gear. And it’s ludicrously fast, accelerating from zero to 100 kilometers per hour in as quick as 3 seconds.
Model X is the SUV uncompromised. </p>
      </div>
  </article>
  
 
  <style>.article_3::after{background-image: url(https://www.tesla.com/content/dam/tesla-site/sx-redesign/img/socialcard/MS.jpg) !important;}</style>
  
  <article class="article_3"> 
    <img src="https://www.tesla.com/content/dam/tesla-site/sx-redesign/img/socialcard/MS.jpg" alt="Tesla model S" />
    <div>
    <h1>Tesla Model S</h1>
    <p> Model S is designed for safety from the ground up and is the most exhilarating saloon on the road. With unparalleled performance delivered through Tesla's unique, all-electric powertrain, Model S accelerates from 0 to 100 kph in as little as 2.6 seconds. Model S comes with Autopilot capabilities designed to make your highway driving not only safer, but stress free. </p>
      </div>
  </article>
</section>



              
            
!

CSS

              
                html,body,div,span,applet,object,iframe,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,label,legend,p,blockquote,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}body{line-height:1;color:black;background:white;}:focus{outline:0;}table{border-collapse:collapse;border-spacing:0;}caption,th,td{text-align:left;font-weight:normal;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul{list-style:none;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}blockquote:before,blockquote:after,q:before,q:after{content:"";}blockquote,q{quotes:"" "";}abbr,acronym{border:0;}





@import url('https://fonts.googleapis.com/css?family=Overpass');



body
{
 background: #212121;
  font-family: 'Overpass', arial;
  
 
  font-size: 1.1rem;
  line-height: 1.3;
  min-height: 100vh;
      display: flex;
    flex: 0;
    align-items: center;
}


  

h1
{
  font-size: 1.6rem;
  hyphens: auto;
  margin: 1rem 0;
}


p{
  margin-bottom: 2rem;
}

section
{
  display: flex;  
  align-content: stretch;
  align-items: stretch;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;

}

article
{
  flex-basis: 0;
  flex-shrink: 1;
  flex-grow: 1;
  background-position: bottom;
  background-size: cover;
  filter: blur(0px);
  display: grid;
  grid-template-areas: "yeoh";
  overflow:hidden;
}

















article::after
{
  background-image: url(https://c.ndtvimg.com/tesla-model-3_625x300_1528450932243.jpg);
  content: "";
  background-position-y: top;
  background-position-x: center;
  background-size: cover;
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  z-index: -1;
  filter: blur(2px);
  transform: scale(1.1); 
}






article:not(:first-child)
{
  margin-left: 1rem;
}


img
{
  width: 100%;
  height: 180px;
  object-fit: cover;

  -webkit-mask-image: linear-gradient(to top, transparent 4%, black 30%);
  mask-image: linear-gradient(to top, transparent 4%, black 30%);

  grid-area: yeoh;
}

article div
{
  background-color: rgba(255, 255, 255, .8);
  padding: 0rem 1rem;
  margin: 150px 1rem 1rem 1rem;

  z-index: 2;
  border-radius: 3px;
  grid-area: yeoh;
  text-shadow: 0px 0px 7px rgba(255, 255, 255, .5);
}

              
            
!

JS

              
                
              
            
!
999px

Console