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

              
                <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Animated Profile Card</title>
</head>
<link rel="stylesheet" href="style.css">
<body>
  
<div class="card">
  <div class="card-header">
    <div class="waves-container">
      <div class="wave wave1"></div>
      <div class="wave wave2"></div>
      <div class="wave wave3"></div>
    </div>
    <img class="profile-img" src="https://www.plainviewmedia.com/wp-content/uploads/2018/07/Trainline-245-599x400.jpg" alt="profile-picture">
  </div>
    <div class="card-body">
      <h2>elon kumar musk</h2>
      <p>My name is elon. I have lived in both Chicago and the District of Columbia.
        Some of my favorite things to do are read, 
        listen to music, and ride public transportation (buses and trains).
      </p>
      <a href="#" class="btn">See my work</a>
    </div>
</div>

</body>
</html>
              
            
!

CSS

              
                /* Embedding montserrat fonts from google fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap');

*{ margin: 0; padding: 0; box-sizing: border-box; }

body{
  background-color: #5B86e5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
}

.card{
  width: 400px;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
}

.card .card-header{
  height: 150px;
  position: relative;
}

.card .card-header .waves-container{
  height: 100%;
}

.card .card-header .waves-container .wave{
  position: absolute;
  width: 650px; height: 650px;
  background-image: linear-gradient(to bottom left, #8aafff, #5B86E5);
  transform: translateX(-50%);
}

.card .card-header .waves-container .wave1{
    border-radius: 50%;
    top: -330%; left: 50%;
    animation: spin 12s linear infinite;
}

.card .card-header .waves-container .wave2{
  border-radius: 46%;
  top: -332%; left: 48%;
  opacity: 0.5;
  animation: spin 16s linear infinite;
}

.card .card-header .waves-container .wave3{
  border-radius: 40%;
  top: -328%; left: 52%;
  opacity: 0.2;
  animation: spin 16s linear infinite;
}

@keyframes spin{
  to{
    transform: translateX(-50%) rotate(360deg);
  }
}

.card .card-header .profile-img{
  margin: 0 auto;
  width: 150px; height: 150px;
  object-fit:cover; /* to maintain the aspect ratio of the image */
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translate(-50%,-50%);
}

.card .card-body{
    margin-top: 100px;
    text-align: center;
    padding: 0 20px;
  }
  
  .card .card-body h2{
    text-transform: capitalize;
    color: rgb(82,82,82);
  }
  
  .card .card-body p{
    font-size: 14px;
    line-height: 1.8;
    color: rgba(82,82,82,0.6);
    margin: 20px 0;
  }
  
  .card .card-body .btn{
    display: inline-block;
    text-decoration: none;
    padding: 15px 45px;
    color: #fff;
    background-color: #5B86E5;
    border-radius: 100px;
    text-transform: uppercase;
    margin:20px 0 40px;
    font-weight: 600;
    letter-spacing: 1px;
  }
              
            
!

JS

              
                
              
            
!
999px

Console