css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <html lang="en">
<head>
  <meta charset="UTF-8" />
</head>
<body>
  <div class="cd"></div>
  <div class="music"></div>
  <audio src="http://7xu39m.com1.z0.glb.clouddn.com/qingtian.mp3" autoplay="autoplay" loop="loop"></audio>
</body>
</html>

            
          
!
            
              .cd
  position: relative
  box-sizing: border-box
  width: 100px
  height: 100px
  margin: 150px auto
  color: #666
  border-radius: 50%
  border: 10px solid rgba(0,0,0,0)
  box-shadow: 0 0 0 4px rgba(247, 247, 247, 0.53) , 0 0 0 100px rgba(22, 24, 24, 0.81), 0 0 0 104px rgba(247, 247, 247, 0.67), 0 0 10px 104px rgba(0, 0, 0, 0.64), 0 0 0 60px rgba(27, 27, 27, 0.79) inset, 0 0 10px 60px rgba(0, 0, 0, 0.73) inset
  animation: spinner 10s linear 0s infinite 
  &:before
    content: "晴天"
    position: absolute
    top: -75px
    width: 100%
    color: #fff
    text-align: center
    font-size: 30px
    font-weight: bold
    text-shadow: 0 0 40px #000, 0 -1px 0 #f3f3f3, 0 -2px 0 #f3f3f3
  &:after
    content: "Copyright © 2016 Kieran. \A All rights reserved."
    position: absolute
    top: 125px
    margin-left: -40px
    white-space: pre
    word-wrap: break-word
    font-size: 13px
    text-align: center
    color: rgba(255, 255, 255, 0.81)
    text-shadow: 0 0 15px #000
  
@keyframes spinner
  from
    transform: rotate(0deg)
  to
    transform: rotate(360deg)
    
.music
  position: absolute
  width: 0
  top: 250px
  left: 0
  right: 0
  margin: auto
  &:before
    content: "♫"
    position: absolute
    opacity: 0
    left: -220px
    font-size: 40px
    animation: music 2.5s infinite ease
  &:after
    content: "♪"
    position: absolute
    opacity: 0
    left: 180px
    font-size: 40px
    animation: music 3.3s infinite ease
@keyframes music
  0%
    opacity: 0
    transform: translate(0px,50px)
  30%
    transform: rotate(12deg) translate(-30px,0px)
  45%
    opacity: 1
  60%
    transform: rotate(-12deg) translate(30px,-100px)
  100%
    opacity: 0
    transform: rotate(0deg) translate(0px,-200px)
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console