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 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.

Quick-add: + add another resource

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.

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.

            
              .iphone-x
  .divider
  .bezel
  .screen
    .notch
    .content
      ul
        img(src='https://upload.wikimedia.org/wikipedia/en/c/c6/Narrow_stairs.jpg')
        br
        li <b>Death&nbsp;Cab&nbsp;For&nbsp;Cutie's&nbsp;album&nbsp;Transatlanticism</b>
        li 1.	"Bixby Canyon Bridge"
        li 2.	"I Will Possess Your Heart"
        li 3.	"No Sunlight"
        li 4.	"Cath..."
        li 5.	"Talking Bird"
        li 6.	"You Can Do Better Than Me"
        li 7.	"Grapevine Fires"
        li 8.	"Your New Twin Sized Bed"
        li 9.	"Long Division"
        li 10.	"Pity and Fear"
        li 11.	"The Ice Is Getting Thinner"
        li <b>iTunes Store bonus tracks</b>
        li 12.	"I Will Possess Your Heart" (Radio Edit)
        li 13.	"Album Credits" (As Read by Mike West)
        li 14.	"The Ice Is Getting Thinner" (Demo)
        li 15.	"No Sunlight" (Demo)
        br
  .speaker
  .camera
  .button.mute
  .button.vol-up
  .button.vol-down
  .button.right
  .divider
  
            
          
!
            
              .iphone-x {
  height: 724px;
  width: 357px;
  background-image: linear-gradient(top, rgba(255,255,255,1) 0%, rgba(255,255,255,1) 1%, rgba(0,0,0,1) 2%, rgba(255,255,255,1) 5%, rgba(255,255,255,1) 95%, rgba(0,0,0,1) 98%, rgba(255,255,255,1) 99%, rgba(255,255,255,1) 100%);
  margin: 0px auto;
  margin-top: -100px;
  border-radius: 55px;
  box-sizing: border-box;
  border: 2px solid black;
  box-shadow: inset 0px 0px 7px 0px rgba(0,0,0,0.75);
  position: relative;
  transform: rotate(-90deg);
}

.divider {
  background: #aaaaaa;
  height: 5px;
  width: 100%;
  position: absolute;
  &:first-of-type {
    top: 9%;
  }
  &:last-of-type {
    bottom: 9%;
  }
}

.bezel {
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  background: #565656;
  background-image: linear-gradient(top, rgba(106,106,106,1) 0%, rgba(0,0,0,1) 1%, rgba(86,86,86,1) 4%, rgba(86,86,86,1) 96%, rgba(0,0,0,1) 99%, rgba(106,106,106,1) 100%);
  position: relative;
  left: 5px;
  top: 5px;
  border-radius: 48px;
  border-left: 3px solid black;
  border-right: 3px solid black;
  border-top: 3px solid #484848;
  border-bottom: 3px solid #0d0d0d;
  box-sizing: border-box;
  box-shadow: inset 0px 0px 7px 0px rgba(190,190,190,.8);
  z-index:2;

  &::after {
    content: "";
    width: calc(100% - 14px);
    height: calc(100% - 14px);
    background: #000;
    position: absolute;
    top: 7px;
    left: 7px;
    border-radius: 40px;
  }
}

.screen {
  z-index:3;
  width: calc(100% - 40px);
  height: calc(100% - 40px);
  background: url('https://images.apple.com/v/iphone-x/a/images/overview/primary/hero_startframe_large_2x.jpg');
  background-size: cover;
  position: absolute;
  top: 20px;
  left: 20px;
  border-radius: 35px;
  overflow: hidden;
  
  &::after {
    content: '';
    width: 56%;
    height: 4%;
    background: #000;
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    margin: 0 auto;
    border-radius: 0 0 20px 20px;
  }
}

.content {
  height: 325px;
  overflow: auto;
  width: 700px;
  background: #fff;
  margin-top: 185px;
  margin-left: -190px;
  transform: rotate(90deg);
  ul {
    margin: 0;
    padding: 0;
    margin-left: 20px;
  }
  img {
    float:right;
    width:200px;
    margin: 50px;
  }
  li.visible {
    margin-left: 30px;
  }
  li {
    list-style: none;
    padding: 10px 0;
    transition: all .1s linear;
    border-bottom: 1px solid #e4e4e4;
    color: #333;
    font-size: 16px;
    width: 50%;
    b {
      font-size:18px;
    }
  }
}


.speaker {
  width: 48px;
  height: 5px;
  position: absolute;
  background: #1c1c1c;
  top: 3.75%;
  z-index: 4;
  left: 0;
  right: 0;
  margin: 0 auto;
  border-radius: 3px;
}

.camera {
  height: 10px;
  width: 10px;
  border-radius: 50%;
  // background: #1b1c20;
  position: absolute;
  z-index: 4;
  top: 3.5%;
  right: 38%;
  background-image: radial-gradient(center, rgba(2,26,60,1) 0%, rgba(49,62,79,1) 8%, rgba(31,62,108,1) 21%, rgba(2,26,60,1) 56%, rgba(2,26,60,1) 100%);
}

.button {
  width: 4px;
  position: absolute;
  z-index: 5;
  background-image: linear-gradient(top, rgba(0,0,0,1) 0%, rgba(244,244,244,1) 15%, rgba(244,244,244,1) 85%, rgba(0,0,0,1) 100%);
  box-sizing: border-box;
  border-left: 1px solid #cdcdcd;
  border-right: 1px solid #303030;
}

.button.mute {
  height: 28px;
  top: 13%;
  left: -4px;
}

.button.vol-up,
.button.vol-down {
  height: 53px;
  left: -4px;
}

.button.vol-up {
  top: 21%;
}

.button.vol-down {
  top: 30%;
}

.button.right {
  right: -4px;
  height: 84px;
  top: 23.5%;
  border-right: 1px solid #cdcdcd;
  border-left: 1px solid #303030;
}
            
          
!
            
              var $content = $(".content");
var $items = $("li");

function positionElements() {
  $items.each(function(index, item) {
    var $item = $(item);
    var top = $item.position().top;

    if (top >= 20 && top <= 250) {
      $item.addClass("visible");
    } else {
      $item.removeClass("visible");
    }
  });
}

positionElements();

$content.on("scroll", function() {
  positionElements();
});


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

Console