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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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.


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

  <img src="" />

  <div id="search-wrap">
    <form role="search" method="get" action="">
      <input type="text" value="" name="" id="search-text">

  <p class="text">虫眼鏡マークをクリックすると<br>検索窓が伸びて出現する検索</p>


                @charset "utf-8";

/*========= 検索窓のためのCSS ===============*/

#search-wrap {
  position: absolute; /*絶対配置にして*/
  z-index: 2; /*最前面に設定。数字は変更可*/
  top: 10px;
  right: 10px;

#search-text {
  -webkit-appearance: none; /*SafariやChromeのデフォルトの設定を無効*/
  width: 60px; /*テキスト入力エリアが伸びる前の横幅*/
  height: 60px;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 5px 5px 2px rgba(6, 0, 1, 0.7);
  background: rgba(255, 255, 255, 0.3)
    url("") no-repeat 17px
    center; /*虫眼鏡アイコンを背景に表示*/
  background-size: 20px 20px;
  transition: all 0.5s; /*transitionを使ってスムースに伸ばす*/
  outline: none;
  cursor: pointer; /*カーソルを指マークに*/

#search-text:focus {
  width: 40vw; /*テキスト入力エリアが伸びる後の横幅*/
  padding: 20px 0 20px 60px;
  background-color: rgba(255, 255, 255, 0.6);

/*========= レイアウトのためのCSS ===============*/
img {
  width: 100%;
  height: 100vh;
  vertical-align: middle;
  filter: brightness(95%) blur(1px);
  object-fit: cover;

p {
  margin: 0 0 10px 0;
  position: absolute;
  mix-blend-mode: overlay;
  color: white;
  font-size: clamp(12px, 5vw, 2rem);
  font-weight: bold;
  text-align: right;
  top: 100px;
  right: 20px;