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

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.

HTML

              
                <section>
  <h1>ガンダム大地に立つ</h1>
  <p>アムロは<span data-text="">ガンダム</span>のコクピットに飛び乗り、機器メーターを見て「こいつ、動くぞ!」と言った。</p>
</section>
              
            
!

CSS

              
                section {
  width: 100%;
  margin: 0 auto;
  max-width: 500px;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
}

span {
  background: #eee;
  padding: 3px;
  position: relative;
}

span:hover {
   cursor: pointer; 
}


              
            
!

JS

              
                //DOM     
const span = document.querySelector("span");

span.addEventListener('click', function () {
  alert('ガンダム(GUNDAM)は、「ガンダムシリーズ」に登場する架空の兵器。有人操縦式の人型ロボット兵器「モビルスーツ」(MS)の一つ。初出は、1979年放送のテレビアニメ『機動戦士ガンダム』。作中の軍事勢力の一つ「地球連邦軍」が開発した試作機の1機で、主人公「アムロ・レイ」の搭乗機。額のV字型ブレードアンテナと、人間の目を模した複眼式のセンサーカメラが特徴で、ほかのMSに比べ人間に近い形状を持つ。これらの特徴は、以降のシリーズ作品に登場する「ガンダムタイプ」の基本となった。敵対勢力である「ジオン公国軍」のMSの多くを凌駕する性能を持ち、パイロットのアムロの成長と相まって「一年戦争」で伝説的な戦果を上げる。(※Wikipediaより)');
}, false);
              
            
!
999px

Console