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

+ add another resource


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


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.


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.


                <div class="sky">


  margin: 0;
  padding: 0;
  /* 设置所有元素的width、height包括其内边距、边框、内容 */
  box-sizing: border-box;
  height: 100vh;
  /* border: 1px solid white; */
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: black;
/* 设置sky的样式 */
  position: relative;
  width: 80vh;
  height: 80vh;
  /* border: 3px solid white; */
  /* 设置span水平垂直居中 */
  display: flex;
  justify-content: center;
  align-items: center;
  /* 溢出隐藏 */
  overflow: hidden;
.sky span{
  position: relative;
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: white;
  /* transform-origin: right; */
  animation: across 1s linear infinite;
@keyframes across{
    margin-top: 100vh;
    margin-left: 100vh;
/* 利用伪元素::before加尾巴 */
.sky span::before{
  width: 60px;
  border: 0.5px solid white;
  border-radius: 50% 0 0 50%;
  position: absolute;
  top: 1px;
  left: -60px;
  /* 设置尾巴以右为旋转定点 */
  transform-origin: right;
  /* 设置尾巴线的方向与移动方向一致 */
  transform: rotate(45deg);