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.

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

Console