Pen Settings

HTML

CSS

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

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

              
                <head>
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <!--==============Animate.cssのCDNを読み込み===============-->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.min.css">

  <!--==============レイアウトを制御する独自のCSSを読み込み===============-->
  <link href="https://assets.codepen.io/6329135/reset04.css" rel="stylesheet">
</head>

<body>

  <!--スーッ-->
  <div class="box line">
    <div class="line2">
      <div class="lineinappear"><img src=" https://assets.codepen.io/6329135/webnavi1.png" width="100" /><br>枠線が伸びて出現</div>
    </div>
  </div>

</body>
              
            
!

CSS

              
                @charset "utf-8";

/*==================================================
スーッ
===================================*/

/*枠線が伸びて出現*/
.line {
  position: relative; /* 枠線が書かれる基点*/
}

/*上下線*/
.line::before,
.line::after {
  position: absolute;
  content: "";
  width: 0;
  height: 1px;
  background: #333; /* 枠線の色*/
}

/*左右線*/
.line2::before,
.line2::after {
  position: absolute;
  content: "";
  width: 1px;
  height: 0;
  background: #333; /* 枠線の色*/
}

/*上線*/
.line::before {
  top: 0;
  left: 0;
  animation: lineAnime 0.5s linear 0s forwards; /*表示されて0秒後に上線が0.5秒かけて表示*/
}

/*右線*/
.line2::before {
  top: 0;
  right: 0;
  animation: lineAnime2 0.5s linear 0.5s forwards; /*表示されて0.5秒後に右線が0.5秒かけて表示*/
}

/*下線*/
.line::after {
  bottom: 0;
  right: 0;
  animation: lineAnime 0.5s linear 1s forwards; /*表示されて1秒後に下線が0.5秒かけて表示*/
}

/*左線*/
.line2::after {
  bottom: 0;
  left: 0;
  animation: lineAnime2 0.5s linear 1.5s forwards; /*表示されて1.5秒後に左線が0.5秒かけて表示*/
}

@keyframes lineAnime {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

@keyframes lineAnime2 {
  0% {
    height: 0%;
  }
  100% {
    height: 100%;
  }
}

/*枠線内側の要素*/
.line .lineinappear {
  animation: lineInnerAnime 0.5s linear 2s forwards; /*2秒後に中央のエリアが0.5秒かけて表示*/
  opacity: 0; /*初期値を透過0にする*/
}

@keyframes lineInnerAnime {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

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

body {
  vertical-align: middle;
  text-align: center;
  width: 100%;
  height: 100vh;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-image: linear-gradient(
    100.6deg,
    rgba(218, 185, 252, 1) 22%,
    rgba(125, 89, 252, 1) 80%
  );
}

.flex {
  display: flex;
  flex-wrap: wrap;
  margin-top: 30px;
}

.box {
  width: 200px;
  padding: 20px;
  margin: 20px 20px;
  color: #333;
  box-sizing: border-box;
  white-space: nowrap;

  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6.5px);
  -webkit-backdrop-filter: blur(6.5px);

  box-shadow: 0px 6px 15px 0px rgba(142, 142, 142, 0.19);
  -webkit-box-shadow: 0px 6px 15px 0px rgba(142, 142, 142, 0.19);

  border: 1px solid rgba(255, 255, 255, 0.4);
}

.line {
  width: 220px;
  padding: 20px;
  margin: 20px;
  box-sizing: border-box;
}

              
            
!

JS

              
                
              
            
!
999px

Console