Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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.


Auto Save

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 id="lottie"></div>


                @import url("");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;

html {
  line-height: 1.5;
  font-size: 15px;
  font-weight: 400;

body {
  width: 100vw;
  min-height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;

  font-family: "Exo", Arial, sans-serif;
  background-color: #151522;
  color: #fff;

#lottie {
  margin-left: auto;



                import bodymovin from "";

var animation = bodymovin.loadAnimation({
  // 动效加载到的DOM元素
  container: document.getElementById("lottie"), // 必须项
  // 包含动效的JSON文件的相对路径,也可以是绝对路径
  // 必须项,描述动效的JSON文件,一般由AE软件中导出的JSON文件
  // 动效渲染出来的格式,可以是svg、canvas和html
  renderer: "svg",
  // 必须项,除了svg选择之外还可以是canvas和html
  // 用于指定动效是否循环播放,true是循环播放,false不是循环播放
  loop: true, // 可选项
  // 指定动效是不是加载后就立即播放,true是立即播放,false不是立即播放
  autoplay: true, // 可选项
  // 指定动效的名称
  name: "mic animation" // 可选项
  // animationData与path互斥,是一个包含导出的动画数据的对象 // animationData: { // ... }