Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <h1>エフェクトいろいろカタログ</h1>
 
<div class="container">
    <section class="box">
      <h2>box1</h2>
      <div class="col_wrapper">
        <div class="left_col  ef ef1_1">
          <p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
        </div>
        <div class="right_col ef ef1_2">
          <p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
        </div>
      </div>
    </section>

    <section class="box">
      <h2>box2</h2>
      <div class="col_wrapper">
        <div class="left_col  ef ef2_1">
          <p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
        </div>
        <div class="right_col ef ef2_2">
          <p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
        </div>
      </div>
    </section>


    <section class="box ef ef3">
      <h2>box3</h2>
      <div class="col_wrapper">
        <div class="left_col">
          <p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
        </div>
        <div class="right_col">
          <p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
        </div>
      </div>
      <p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>

    </section>


    <section class="box ef ef4">
      <h2>box4</h2>
      <div class="col_wrapper">
        <div class="left_col">
          <p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
        </div>
        <div class="right_col">
          <p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
        </div>
      </div>
    </section>


    <section class="box ef ef5">
      <h2>box5</h2>
          <p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
          <p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
          <p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
    </section>


    <section class="box ef ef6">
      <h2>box6</h2>
          <p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
          <p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
          <div class="ef6_cover_1"></div>
          <div class="ef6_cover_2"></div>
    </section>

  </div>

              
            
!

CSS

              
                /* common */
body{
  font-size: 16px;
  font-family: Verdana,sans-serif;
  width: 100%;
  overflow-x: hidden;
}
h1{
  margin-top: 40px;
}
.container{
  width: 100%;
  max-width: 800px;
  margin:100px auto  0;
}
.col_wrapper:after{
  content: "";
  display: table;
  clear: both;
}
.left_col{
  float: left;
}
.right_col{
  float: right;
}

/* box */
.box{
  margin-bottom: 80px;
  padding:10px;
  background: #ddd;
  box-sizing: border-box;
}
.left_col{
  width: 30%;
}
.right_col{
  width: 68%;
}
.ef{
  visibility: hidden;
}
.is_visible{
  visibility: visible !important;
}

/* box1 */
.ef1_1.is_visible{
  -webkit-animation-fill-mode:both;
  animation-fill-mode:both;
  -webkit-animation-duration:.5s;
  animation-duration:.5s;
  -webkit-animation-delay: 0;
  animation-delay: 0;
  -webkit-animation-name: ef1;
  animation-name: ef1;
}
.ef1_2.is_visible{
  -webkit-animation-fill-mode:both;
  animation-fill-mode:both;
  -webkit-animation-duration:.5s;
  animation-duration:.5s;
  -webkit-animation-delay: .3s;
  animation-delay: .3s;
  -webkit-animation-name: ef1;
  animation-name: ef1;
}
@-webkit-keyframes ef1 {
  0% {
    opacity: 0;
    -webkit-transform: translateX(20px);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0);
  }
}
@keyframes ef1 {
  0% {
    opacity: 0;
    transform: translateX(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* box2 */
.ef2_1.is_visible{
  -webkit-animation-fill-mode:both;
  animation-fill-mode:both;
  -webkit-animation-duration:.5s;
  animation-duration:.5s;
  -webkit-animation-delay: 0;
  animation-delay: 0;
  -webkit-animation-name: ef2;
  animation-name: ef2;
}
.ef2_2.is_visible{
  -webkit-animation-fill-mode:both;
  animation-fill-mode:both;
  -webkit-animation-duration:.5s;
  animation-duration:.5s;
  -webkit-animation-delay: .3s;
  animation-delay: .3s;
  -webkit-animation-name: ef2;
  animation-name: ef2;
}
@-webkit-keyframes ef2 {
  0% {
    opacity: 0;
    -webkit-transform: translateY(20px);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0);
  }
}
@keyframes ef2 {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* box3 */
.ef3.is_visible{
  -webkit-animation-fill-mode:both;
  animation-fill-mode:both;
  -webkit-animation-duration:.5s;
  animation-duration:.5s;
  -webkit-animation-delay: 0;
  animation-delay: 0;
  -webkit-animation-name: ef3;
  animation-name: ef3;
}
@-webkit-keyframes ef3 {
  0% {
    opacity: 0;
    -webkit-transform: scale(1.2,1.2);
  }
  100% {
    opacity: 1;
    -webkit-transform: scale(1,1);
  }
}
@keyframes ef3 {
  0% {
    opacity: 0;
    transform: scale(1.2,1.2);

  }
  100% {
    opacity: 1;
    transform: scale(1,1);
  }
}

/* box4 */
.ef4.is_visible{
  -webkit-animation-fill-mode:both;
  animation-fill-mode:both;
  -webkit-animation-duration:.5s;
  animation-duration:.5s;
  -webkit-animation-delay: 0;
  animation-delay: 0;
  -webkit-animation-timing-function: ease-out;
  animation-timing-function: ease-out;
  -webkit-animation-name: ef4;
  animation-name: ef4;
}
@-webkit-keyframes ef4 {
  0% {
    opacity: 0;
    -webkit-transform:translateX(500px);
  }
  70%{
    opacity: 1;
    -webkit-transform:translateX(-30px);
  }
  100% {
    -webkit-transform:translateX(0px);
  }
}
@keyframes ef4 {
  0% {
    opacity: 0;
    transform:translateX(500px);
  }
  70%{
    opacity: 1;
    transform:translateX(-30px);
  }
  100% {
    transform:translateX(0px);
  }
}

/* box5 */
.ef5.is_visible{
  -webkit-animation-fill-mode:both;
  animation-fill-mode:both;
  -webkit-animation-duration:.5s;
  animation-duration:.5s;
  -webkit-animation-delay: 0;
  animation-delay: 0;
  -webkit-animation-timing-function: ease-in-out;
  animation-timing-function: ease-in-out;
  -webkit-animation-name: ef5;
  animation-name: ef5;
}
@-webkit-keyframes ef5 {
  0% {
    opacity: 0;
    -webkit-transform: scale(0);
  }
  100% {
    -webkit-transform: scale(1);
  }
}
@keyframes ef5 {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

/* box6 */
.ef6{
  position: relative;
  overflow: hidden;
}
.ef6_cover_1{
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,1);
}
.ef6_cover_2{
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,.5);
}
.is_visible .ef6_cover_1{
  -webkit-animation-fill-mode:both;
  animation-fill-mode:both;
  -webkit-animation-duration:.5s;
  animation-duration:.5s;
  -webkit-animation-delay: 0;
  animation-delay: 0;
  -webkit-animation-timing-function: ease-in-out;
  animation-timing-function: ease-in-out;
  -webkit-animation-name: ef6;
  animation-name: ef6;
}
.is_visible .ef6_cover_2{
  -webkit-animation-fill-mode:both;
  animation-fill-mode:both;
  -webkit-animation-duration:.4s;
  animation-duration:.4s;
  -webkit-animation-delay: .3s;
  animation-delay: .3s;
  -webkit-animation-timing-function: ease-in-out;
  animation-timing-function: ease-in-out;
  -webkit-animation-name: ef6;
  animation-name: ef6;
}
@-webkit-keyframes ef6 {
  0% {
    right: 0;
  }
  100% {
    right: 100%;
  }
}
@keyframes ef6 {
  0% {
    right: 0;
  }
  100% {
    right: 100%;
  }
}

              
            
!

JS

              
                var tgt = $('.ef');

$(window).on('load scroll',function(){
  var wh = $(window).height();
  var sc = $(window).scrollTop();

  var action = function(){
    tgt.each(function(){
     var border = $(this).offset().top;
     if(sc > border - wh +100){
      $(this).addClass('is_visible');
     }
    });
  };
  action();
});

              
            
!
999px

Console