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.

            
              <section>
  <!-- content -->
  <article class="content">
    <p class="tx">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea magni vero porro iure provident quae blanditiis cupiditate sint doloribus incidunt nobis nihil. Fugiat sit ipsum cumque deserunt quibusdam amet veniam.</p>
    <p class="tx">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores repellat magni aperiam mollitia odit molestias a fuga praesentium at nulla autem sapiente tempore eius fugiat harum aut saepe quas amet.</p>
    <p class="tx">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deserunt consequatur accusantium tempore sapiente fugiat tenetur nulla porro nostrum ipsa minima totam dicta consectetur neque recusandae debitis incidunt sunt voluptatibus veritatis.</p>
  </article>
  
  <!-- menu -->
  <div class="menu-area">
    <ul class="lst">
      <li class="it">
        <a href="#" class="lnk">lorem</a>
        <ul class="lst-smenu">
          <li class="it-smenu"><a href="" class="lnk-smenu">sit</a></li>
          <li class="it-smenu"><a href="" class="lnk-smenu">a</a></li>
          <li class="it-smenu"><a href="" class="lnk-smenu">met</a></li>
        </ul>
      </li>
      <li class="it"><a href="#" class="lnk">ipsum</a></li>
      <li class="it"><a href="#" class="lnk">dolor</a></li>
    </ul>
  </div>
  
  <!-- svg -->
  <svg xmlns="http://www.w3.org/2000/svg"  version="1.1">
    <defs>
      <filter id="blur">
        <feGaussianBlur stdDeviation="5"/>
      </filter>
    </defs>
  </svg>
  
</section>
            
          
!
            
              html, body, section, section::after {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family:helvetica, arial, sans-serif;
}

section {
  background-image:url(https://4.bp.blogspot.com/-2T2XNIbAZ-s/T5-zfAjO_gI/AAAAAAAAINc/CBk42qEJPeQ/s1600/people.jpg);
  background-size:cover;
  color:#000;
}

.menu-open {
  background:none;
}

.menu-open::after {
  content:' ';
  background-image: url(https://4.bp.blogspot.com/-2T2XNIbAZ-s/T5-zfAjO_gI/AAAAAAAAINc/CBk42qEJPeQ/s1600/people.jpg);
  -webkit-filter: url('#blur');
  -moz-filter: url('#blur');
  filter: url('#blur');
  -webkit-filter: blur(5px);
  -moz-filter: blur(5px);
  filter: blur(5px);
  position:absolute;
  top:0;
	left:0;
  background-size:cover;
  z-index:1;
  opacity:0.4;
}

.menu-area {
  display:none;
  position: absolute;
  width: 100%;
  height: 100%;
  top:0;
}

.menu-open .menu-area {display:block;}

section.menu-open .content {opacity:0.4}

.menu-area {
  background:none;
  color:#000;
  z-index:2;
}

/*content*/
.lst {
  padding:20px;
  text-align:center;
}

.it {
  border-top:1px solid #ccc;
}

.lnk {
  color:#000;
  text-decoration:none;
  font-size:2em;
  text-shadow:1px 1px 1px rgba(0,0,0,0.3);
  font-weight:bold;
  padding:10px 0;
  display:block;
}

.tx {
  margin:0.5em 1em 1em;
}

.it-smenu {
  padding:5px;
  border-top:1px solid #ccc;
  background:rgba(0,0,0,0.5)
}

.lst-smenu {
  display:none;
}

.lnk-smenu {
  color:#fff;
  text-decoration:none;
}

.trigger {
  z-index:5;
  position:absolute;
  right:10px;
  top:10px;
  background:red;
  padding:5px;
  cursor:pointer;
}


            
          
!
            
              $('section').prepend('<span class="trigger">click</span>');

$('.trigger').click(function(e) {
  $('section').toggleClass('menu-open'); 
});

$('.lnk').each(function() {
  $(this).click(function() {
    $(this).next('.lst-smenu').slideToggle(300);
  });
});
            
          
!
999px
Loading ..................

Console