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 is required to process package imports. If you need a different preprocessor remove all packages first.

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


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


  pointer-events: none;


                function onYouTubeIframeAPIReady() {
  var player;
  player = new YT.Player('YouTubeVideoPlayerAPI', {
    videoId: 'rshfNb2ped8',   // YouTube 影片ID
    width: '1080',            // 播放器寬度 (px)
    height: '720',           // 播放器高度 (px)
    playerVars: {
      autoplay: 1,            // 自動播放影片
      controls: 0,            // 顯示播放器
      showinfo: 0,            // 隱藏影片標題
      modestbranding: 0,      // 隱藏YouTube Logo
      loop: 1,                // 重覆播放
      playlist:'rshfNb2ped8', // 當使用影片要重覆播放時,需再輸入YouTube 影片ID
      fs: 0,                  // 隱藏全螢幕按鈕
      cc_load_policty: 0,     // 隱藏字幕
      iv_load_policy: 3,      // 隱藏影片註解
      autohide: 0             // 影片播放時,隱藏影片控制列
    events: {
      onReady: function(e) {;      //播放時靜音; //強制播放(手機才會自動播放,但僅限於Android)