cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-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="example-cntr fullscreen">
    <h1>CSS <code>:fullscreen</code> pseudo-class</h1>
    <p>The <code>:fullscreen</code> pseudo-class targets elements that are being displayed in full screen mode.</p>
    <p>However, take note that the <code>:fullscreen</code> pseudo-class <strong class="underline">is not</strong> intended to work when pressing F11 to enter full screen in the browser.</p>
    <p>The way to know if we have entered the full-screen mode is when a message appears on the browser (top or bottom) letting us know that we have entered full-screen mode and that pressing <code>ESC</code> takes us back to the page. We see this when we maximize a video on YouTube or Vimeo.</p>
    <h4>Example - <span class="note">Note: This demo only works on Chrome and Edge.</span></h4>
    <h1 id="element"><span class="hide">The text is injected via CSS</span></h1>
    <button onclick="var el = document.getElementById('element'); el.webkitRequestFullscreen();">Trigger Full Screen!</button>
</div>
            
          
!
            
              #element {
    border-bottom: none;
    background: none;
    //Content in "normal" mode.
    &:before {
        content: 'Normal mode';
    }
    //Content in fullscreen mode
     &:fullscreen:before {
         content: 'Fullscreen mode';         
    }
}


//Styling stuff not needed for demo
body {
    text-align: left;
    line-height: 1.5;
}
h1 {
    font-size: 22px;
    text-transform: none;
    border-bottom: #636363 1px dotted;
    code {
        display: inline-block;
        margin-bottom: 10px;
        color: $y;
        background: none;
        box-shadow: none;
    }
}
h4 { margin-bottom: 15px; }
code { font-size: 1em; }
.example-cntr {
    max-width: 800px;
    margin: 0 auto 50px;
    padding: 30px;
    box-shadow: 0 1px 2px rgba(black,.3);
    background: rgba(black,.15);
    & > code {
        display: block;
        margin-bottom: 10px;
        font-size: 22px;
        color: $y;
        background: none;
        box-shadow: none;
    }
}
.underline { text-decoration: underline; }

//
.hide { display: none; }
#element {
    padding-bottom: 20px;
    &:before { 
        display: block;
        padding: 5px 0;
        background: $b;
    }
    &:fullscreen:before {
        display: block;
        padding: 5px 250px;
        background: $r;
    }    
}
button {
    padding: 8px 15px;
    cursor: pointer;
    background: linear-gradient(white, #aaa);
    border-radius: 2px;
    &:hover { background: white; }
    &:active { background: linear-gradient(#aaa, white 20%);}
}
.note {
    color: desaturate($y,30);
    font-size: 12px;
    letter-spacing: .5px;
}
.fullscreen h1 { margin: 0; }
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console