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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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 class="centerthis">
  <!-- <h3>Say this: "Read It To Me!"</h3> -->
  <h3>Wait for it...</h3>
  <header>Wait for it...</header>
  <pre id="userInput" contenteditable="true">
You never close your eyes anymore when I kiss your lips.
And there's no tenderness like before in your fingertips.
You're trying hard not to show it.
(Baby?)
But baby, baby I know it.
You've lost that lovin' feelin'.
Oh that lovin' feelin'.
You've lost that lovin' feelin'.
Now it's gone, gone, gone. oh. oh. oh.
There's no welcome look in your eyes when I reach for you.
And girl you're starting to criticize little things I do.
Ooh, it makes me just feel like cryin'.
(Baby?)
'Cause baby something beautiful's dyin'.
You've lost that lovin' feelin'.
Oh that lovin' feelin'.
You've lost that lovin' feelin'.
Not it's gone, gone, gone. oh. oh. oh.
Baby, baby, I get down on my knees for you.
(Get down on my knees?)
If you would only love me like you used to do.
(If you would only love me, love me?)
We had a love, a love, a love you don't find everyday.
(A love you don't find?)
So don't, don't, don't let it slip away.
(Away?)
I said, "Baby!"
(Baby?)
Baby!
(Baby?)
(I'm beggin' you please?)
I'm beggin' you please!
I need your love!
(I need your love?)
I need your love.
So bring it on back.
(Bring it on back?)
Now bring it on back.
(Now bring it on back?)
You've got to bring back that lovin' feelin'.
Oh that lovin' feelin'.
Bring back that lovin' feelin'.
'Cause it's gone, gone, gone
And I can't go on, oh, oh, oh
Bring back that lovin' feelin'.
Oh that lovin' feelin'.
Bring back that lovin' feelin'.
'Cause it's gone, gone, gone.
Bring back that lovin' feelin'.
Oh that lovin' feelin'.
Bring back that lovin' feelin'.
'Cause it's gone, gone, gone.
Bring back that lovin' feelin'.
Oh that lovin' feelin'.
Bring back that lovin' feelin'.</pre>
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Slabo+27px);

* {
  box-sizing: border-box;
}

.centerthis {
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -24vmin;
  margin-left: -44vmin;
  
  width: 88vmin;
  height: 48vmin;
}

h3 {
  font-size: 7.5vmin;
  margin-top: 0;
  margin-bottom: 1vmin;
}

header {
  font-size: 4.5vmin;
}

#userInput {
  display: none;
  
  border: 0.5vmin solid black;
  border-radius: 0.5rem;
  width: 86vmin;
  height: 26vmin;
  font-family: 'Slabo 27px', serif;
  font-size: 3.7vmin;
  line-height: 5.1vmin;
  letter-spacing: 0.1vmin;
  padding: 0 0.3vmin;
  overflow-y: scroll;
  
  &:active, &:focus {
    outline: none;
  }
}
              
            
!

JS

              
                (function() {
  'use strict';
  
  const recitePoem = function () {
    var msg = new SpeechSynthesisUtterance($('#userInput').text());
    window.speechSynthesis.speak(msg);
  };
  
  setTimeout(recitePoem, 3000);
  
  if (annyang) {
    const commands = {
      'read it to me': () => {
        recitePoem();
      }
    };

    annyang.addCommands(commands);
    annyang.start();
  } else {
    console.debug('Fudgenuggets of Hazelnut and Lime');
  }
  
  $(function() {
    const support = !!window.speechSynthesis ? '' : 'not';
    const tmpl = `<p>Speech sythesis is ${support} supported by your browser</p>`;
    $('header').html(tmpl);
  });
}());

              
            
!
999px

Console