Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

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

              
                
<ul class="g-container">
    <li class="">Codepen</li>
    <li class="g-select-all">Not Single Word</li>
    <li class="g-select-all">138-2254-6698</li>
    <li class="">这是一长串的地址,<span class="g-select-all">广东省,深圳市,南山区,xxxxxxx</span></li>
    <li class="">这是无用信息,<span class="g-select-all">中间的有用信息,被分割</span>,这是无用信息</li>
<!--     <li class="g-select-all">123-456-789</li> -->
</ul>

              
            
!

CSS

              
                html,
body {
    width: 100%;
    height: 100%;
    place-items: center;
    padding: 20px;
}

ul li{
    display: block;
    line-height: 24px;
    letter-spacing: 4px;
    
    span {
        // color: deeppink;
    }
}

.g-select-all {
    user-select: all;
}

.g-select-all::selection {
    background: #f7ec91;
    color: #333;
    text-shadow: 0 0 .5px #aaa, 1px 1px .5px #aaa, 2px 2px .5px #aaa, 3px 3px .5px #aaa, 4px 4px .5px #aaa;
}
              
            
!

JS

              
                
              
            
!
999px

Console