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="item-1">
  <h1>Grid</h1>
  <p>Responsive. Resize me.</p>
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque accumsan euismod mauris, eget ornare erat luctus at. Etiam quis enim sed orci eleifend condimentum. Quisque pulvinar libero ante, non faucibus neque suscipit non.</p>
</div>
<div class="item-2">
</div>
<div class="item-3">
</div>
<div class="item-4">
</div>
<div class="item-5">
  <p>Duis sodales nisi a lacus sagittis tincidunt. Praesent a risus malesuada ligula condimentum dictum vel sit amet leo. Vestibulum maximus nibh nec cursus iaculis. Fusce vulputate magna vitae nisi ornare blandit.</p>
</div>
<div class="item-6">
  <h2>Sed euismod lectus</h2>
  <p>At dolor auctor efficitur. Aenean dignissim, elit sed facilisis lacinia, velit sem tincidunt mi, ultricies mattis nibh sapien sit amet arcu. <a href="http://store.daniellemlbastien.com">Maecenas a dui ex.</a> Proin at neque accumsan, convallis felis sit amet, elementum leo. Sed nisi tellus, blandit in hendrerit eu, rhoncus vitae nunc. Proin viverra egestas quam sed interdum.</p>
</div>
<div class="item-7">
</div>
            
          
!
            
              $white: #ffffff;
$blue: #27cbf4;
$purple: #c798f9;
$red: #5B1B27;
$breakpoint: 50em;

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 16pt; }

body {
  font-size: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, minmax(200px, auto));
  
  @media screen and (max-width: $breakpoint){
    grid-template-rows: repeat(8, minmax(200px, auto));
  }
}


.item-1,.item-6 {
  grid-column: span 2;
  grid-row: span 2;
  
  @media screen and (max-width: $breakpoint){
    grid-column: span 4;
  }
}

.item-4, .item-5 {
  grid-row: span 2;
}

.item-2, .item-3, .item-4, .item-5  {
  @media screen and (max-width: $breakpoint){
    grid-column: span 2;
  }
}

.item-7  {
  grid-column: span 2;
  
  @media screen and (max-width: $breakpoint){
    grid-column: span 4;
  }
}


a {
  color: $blue;
  &:visited { 
    color:  $purple;
  }
  &:hover, 
  &:active {
    color: $red;
  }
  
}


[class^=item] {
  padding: 1em 2.5em;
}

.item-1, .item-4, .item-3, .item-7 {
   background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.item-1 {
  background-image: linear-gradient(30deg, rgba(255,255,255,.1), $white), url(https://c1.staticflickr.com/5/4169/33649007304_d756838b71_z.jpg);
  background-blend-mode: screen;
}

.item-2 {
  background-color: darken($purple, 50%);
  background-image: url(http://img.daniellemlbastien.com/bg/pattern-swirl.png);
  background-repeat: repeat;
  background-size: 50%;
  background-blend-mode: screen;
}

.item-3 {
  background-color: $red;
  background-image: url(https://c1.staticflickr.com/4/3896/32207633534_d2d46ae0d5_z.jpg);
  background-blend-mode: overlay;
  
}


.item-4 {
  background-image: url(https://c1.staticflickr.com/5/4187/34363422191_5ef0dc0591_z.jpg);
}

.item-5 {
  background-image: url(https://c1.staticflickr.com/5/4181/34452681216_ac91861ec1_z.jpg);
  background-position: right right;
  background-repeat: no-repeat;
  
  @media screen and (max-width: $breakpoint){
    background-size: 100%;
    background-position: right bottom;
  }
}

.item-6 {
  background-image: linear-gradient( darken($purple, 50%), $red), url(http://img.daniellemlbastien.com/bg/pattern-concrete.png);
  color: $white;
  background-blend-mode: multiply;
}

.item-7  {
  background-image:  url(https://c1.staticflickr.com/5/4155/34452711216_9a2494f790_z.jpg);
}
 
            
          
!
999px
Loading ..................

Console