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


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.


                <a href="#modal" class="link">打开窗口</a>

<div class="modal" id="modal">
  <div class="overlay">
    <div class="content">
      <p>卡耐基对微笑有这样的描述:“它在家中产生,他不能买,不能求,不能借,不能偷,因为在人们得到它之前,对谁都是无用的东西,他给予后人之后,会使你得到别人的好感,它是疲倦者的休息,希望的阳光,悲哀者的力量,又是大自然免费赋予人们的一种解除苦难的良药。” </p>

      <a href="#" class="close">✖</a>


                * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", "微软雅黑", "pingfang sc", "宋体", Arial,
        Helvetica, sans-serif;
    font-size: 14px;
a {
  text-decoration: none;
.link {
  display: block;
  text-align: center;
  margin-top: 1em;
/* --- */
.modal {
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease-in;
.modal:target {
  opacity: 1;
  visibility: visible;
/* --- */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
.content {
  position: relative;
  width: 320px;
  padding: 1em;
  background-color: #efefef;
  border-radius: 5px;
  text-align: justify;
  color: #262626;
  border: 1px solid rgba(0,0,0,0.2);
.content > *:not(.close) {
  margin: 1em 0;
.close {
  position: absolute;
  top: 5px;
  right: 10px;
  color: #f93154;