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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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="app">
  <div class="top">
    <p>
      <span class="tips">由于大促期间订单量激增,您的订单送达时效可能出现延迟,请您耐心等待~</span>
      <span>由于大促期间订单量激增,您的订单送达时效可能出现延迟,请您耐心等待~</span>
    </p>
  </div>
  <div class="main">
    <h6>然后这里放的就是卤煮</h6>
    <h4>外放堪称手机圈</h4>
    <h2>宇宙无敌第一</h2>
    <h6>小米10 Pro</h6>
    <h2>wo不接受争辩</h2>
    <h3>·</h3>
    <h3>·</h3>
    <h3>·</h3>
    <h3>·</h3>
  </div>
</div>
              
            
!

CSS

              
                .tips{
  width: 560px;
}
p{
  position: absolute;
  height: 34px;
  left: 34px;
  white-space: nowrap;
  display: flex;
  animation: move linear 12s infinite;
}
@keyframes move {
  0%{ left: 34px; }
  100%{ left: -526px; }
}


/* 这里以下请忽略,重点在上面 */

*{margin: 0; padding: 0;}
body,html{height: 100%;}
#app{
  height: 100%;
  background:#ececec;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.main{
  flex: 1;
}
.top{
  position: relative;
  overflow: hidden;
  height: 34px;
  background: #fff;
}
.top span{
  line-height: 34px;
  display: inline-block;
}
.top::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 34px;
  z-index: 9;
  background-image: linear-gradient(90deg,#f00 0%, #f00 60%, transparent 100%);
}
.top::after{
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 34px;
  z-index: 9;
  background-image: linear-gradient(-90deg,#f00 0%, #f00 60%, transparent 100%);
}
h1,h2,h3,h4,h5,h6{
  margin: 20px auto;
  text-align: center;
}
              
            
!

JS

              
                
              
            
!
999px

Console