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.


  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <link rel="stylesheet" type="text/css" href="">

  <header id="header">
    <div id="video-area">
      <video id="video" poster="img/movie.jpg" webkit-playsinline playsinline muted autoplay loop>
        webkit-playsinline:iOS 9までのSafari用インライン再生指定
        playsinline:iOS 10以降のSafari用インライン再生指定
        <source src="" type="video/mp4">
  <div id="container">
    <p>This is test movie.</p>


                @charset "utf-8";

/*========= 背景動画設定のCSS ===============*/

#header {
  position: relative; /*h1の中央寄せ配置の起点とするためのrelative*/
  height: 100vh; /*高さを全画面にあわせる*/

#video-area {
  position: fixed;
  z-index: 1; /*最背面に設定*/
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  overflow: hidden;

#video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 177.77777778vh; /* 16:9 の幅 → 16 ÷ 9= 177.77% */
  height: 56.25vw; /* 16:9の幅 → 9 ÷ 16 = 56.25% */
  min-height: 100%;
  min-width: 100%;

h1 {
  position: fixed;
  z-index: 2; /*下から2番目に表示*/
  top: 50%;
  left: 50%;
  transform: translateY(-50%) translateX(-50%);
  color: #fff;
  text-shadow: 0 0 15px #666;
  font-size: 20vw;
  opacity: 0.7;

/*========= レイアウトのためのCSS ===============*/

#container {
  position: relative; /*relativeを指定してfixed指定をした#video-areaの上に表示*/
  z-index: 3; /*一番上に表示*/
  background: #000;
  padding: 80vh 0 15vh 0;
  text-align: center;
  opacity: 0.5;

p {
  color: #fff;
  font-size: 5vw;