Pen Settings

HTML

CSS

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.

+ 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

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.

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

              
                <div id='light'></div>
        <nav class="navigation">
            <ul>
                <li><a href="#">Chapter 1</a></li>
                <li><a href="#">Chapter 2</a></li>
                <li><a href="#">Chapter 3</a></li>
                <li><a href="#">Chapter 4</a></li>
                <li><a href="#">Chapter 5</a></li>
            </ul>
        </nav>
        <div class="text-container">
            <h1>"Dummy" Kafka's text here</h1>
            <p>
                One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. 
                He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. 
                The bedding was hardly able to cover it and seemed ready to slide off any moment.
            </p>
            <p>
                His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked.
                "What's happened to me? " he thought. It wasn't a dream. His room, a proper human room although a little too small, 
                lay peacefully between its four familiar walls. A collection of textile samples lay spread out on the table - 
                Samsa was a travelling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine 
                and housed in a nice, gilded frame.
            </p>
            <p>
                It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer. 
                Gregor then turned to look out the window at the dull weather. Drops of rain could be heard hitting the pane, which made him feel quite sad. 
                "How about if I sleep a little bit longer and forget all this nonsense", he thought, but that was something he was unable to do because he was used to sleeping on his right, 
                and in his present state couldn't get into that position.
                However hard he threw himself onto his right, he always rolled back to where he was. 
            </p>
            <p>
                He must have tried it a hundred times, shut his eyes so that he wouldn't have to look at the floundering legs, 
                and only stopped when he began to feel a mild, dull pain there that he had never felt before. 
                "Oh, God", he thought, "what a strenuous career it is that I've chosen! Travelling day in and day out. 
                Doing business like this takes much more effort than doing your own business at home, and on top of that there's the curse of 
                travelling, worries about making train connections, bad and irregular food, contact with different people all the time so that 
                you can never get to know anyone or become friendly with them. It can all go to Hell! " He felt a slight itch
            </p>
            <div class="bottom-links">
                <ul class="chapter-select">
                    <li><a href="#">Next Chapter</a></li>
                    <li><a href="#">Previous Chapter</a></li>
                </ul>
            </div>
        </div>
              
            
!

CSS

              
                body {
    background-color: #000;
    overflow-x: hidden;
}

body * {
    z-index: 20;
    color: #000;
}

#light {
    position: absolute;
    width: 500px;
    height: 500px;
    background-color: #fff;
    z-index: 10;
    -webkit-box-shadow: inset 0px 0px 150px 166px rgba(0,0,0,1);
    -moz-box-shadow: inset 0px 0px 150px 166px rgba(0,0,0,1);
    box-shadow: inset 0px 0px 150px 166px rgba(0,0,0,1);

}

li a:hover {
  color: blue;
}

.navigation {
    position: relative;
    top: 50px;
  float: left;
}

.navigation ul {
    list-style: none;
}

.text-container {
    position: relative;
  width: 80%;
    top: 50px;
  float: right;
}

#fs {
    position: relative;
    color: #000;
    margin: 20px;
    cursor: pointer;
}

p {
    position: relative;
}

.bottom-links {
    position: relative;
}

.chapter-select {
    list-style: none;
    float: left;
    margin-top: 20px;
}

.share-chapter {
    list-style: none;
    float: right;
    margin-top: 20px;
}

.chapter-select li {
    display: inline-block;
    margin-right: 10px;
}

.share-chapter li {
    display: inline-block;
}

.share-chapter img{
    width: 35px;
}



              
            
!

JS

              
                $(document).ready(function(){
   $(document).mousemove(function(event){
      $("#light").css({"top": event.pageY - 250, "left": event.pageX - 250}); 
   }); 
   
   
});
              
            
!
999px

Console