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

              
                <div class="frame flex">
  <div class="center">
    
		<div class="profile">
			<div class="image">
				<div class="circle-1"></div>
				<div class="circle-2"></div>
				<img src="https://images.unsplash.com/photo-1536444894718-0021cbbeb45f?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60" alt="Jessica Potter" width="70" height="70">
			</div>
			
			<div class="name">Jessica Potter</div>
			<div class="job">Web developer</div>
			
      <div>
        <svg xmlns="http://www.w3.org/2000/svg" 
           width="40px" height="30px"
           viewBox="5 0 80 60">
          <path id="wave" 
              fill="none" 
              stroke="#262626" 
              stroke-width="2"
              stroke-linecap="round">
          </path>
        </svg>
      </div>


			<div class="actions">
				<button class="btn hvr-underline-from-center">Follow</button>
				<button class="btn hvr-underline-from-center">Message</button>
			</div>
		</div>
		
		<div class="stats">
			<div class="box box1 hvr-underline-from-right">
				<span class="value">523</span>
				<span class="parameter">Posts</span>
			</div>
			<div class="box box2 hvr-underline-from-right">
				<span class="value">1387</span>
				<span class="parameter">Likes</span>
			</div>
			<div class="box box3 hvr-underline-from-right">
				<span class="value">146</span>
				<span class="parameter">Followers</span>
			</div>
		</div>
  </div>
</div>

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Josefin+Sans|Josefin+Slab|Lobster');
body {
  background: #201c29;
}
.frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  margin-top: -200px;
  margin-left: -200px;
  border-radius: 2px;
  box-shadow: .5rem .5rem 1rem rgba(0, 0, 0, 0.6);
  background: #643a7a;
  color: #786450;
  font-family: 'Josefin slab', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.flex {
  display: flex;
  justify-content: center;
  align-items: center;
}
.center {
  height: 299px;
  width: 320px;
  background: #fff;
  border-radius: 6px;
  box-shadow: .5rem .5rem 1rem rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.profile {
  float: left;
  width: 200px;
  height: 320px;
  text-align: center;
}
.profile .image {
  position: relative;
  width: 80px;
  height: 70px;
  margin: 38px auto 0 auto;
}
.profile .image .circle-1, .profile .image .circle-2 {
  position: absolute;
  box-sizing: border-box;
  width: 76px;
  height: 76px;
  top: -3px;
  left: -3px;
  border-width: 1px;
  border-style: solid;
  border-color: #643a7a #643a7a #643a7a transparent;
  border-radius: 50%;
  transition: all 1.5s ease-in-out;
}
.circle-1 {
  animation: circle-1 2s;
}
@keyframes circle-1 {
  100% {
    transform: rotate(-360deg);
  }
}
.profile .image .circle-2 {
  width: 82px;
  height: 82px;
  top: -6px;
  left: -6px;
  border-color: #786450 transparent #786450 #786450;
  animation: circle 2s;
}
@keyframes circle {
  100% {
    transform: rotate(360deg);
  }
}
.profile .image img {
  display: block;
  border-radius: 50%;
  background: #F5E8DF;
}
.profile .image:hover {
  cursor: pointer;
}
.profile .image:hover .circle-1, .profile .image:hover .circle-2 {
          transform: rotate(360deg);
}
.profile .image:hover .circle-2 {
          transform: rotate(-360deg);
}
.profile .name {
  font-size: 2rem;
  margin-top: 20px;
}
.profile .job {
  font-size: 1.2rem;
  line-height: 15px;
}
svg { 
  margin: 0 auto; 
  overflow: hidden;
}

#wave {
  stroke-dasharray: 0 16 101 16;
  animation: moveTheWave 2400ms linear infinite;  
}

@keyframes moveTheWave {
  0% { 
    stroke-dashoffset: 0; 
    transform: translate3d(0, 0, 0);
  }
  100% { 
    stroke-dashoffset: -133;
    transform: translate3d(-90px, 0, 0);
  }
}
.profile .actions .btn {
  display: block;
  width: 80px;
  height: 30px;
  margin: 0 auto 10px auto;
  background: none;
  border: 2px solid transparent;
  font-size: 1.1rem;
  box-sizing: border-box;
  color: #643a7a;
}
.btn, .parameter {
  font-family: 'Josefin sans';
}
.profile .actions .btn:hover {
  cursor: pointer;
}

.hvr-underline-from-center {
  display: inline-block;
  vertical-align: middle;
  transform: perspective(1px) translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  position: relative;
  overflow: hidden;
}
.hvr-underline-from-center:before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 51%;
  right: 51%;
  bottom: 0;
  background: #643a7a;
  height: 1px;
  transition-property: left, right;
  transition-duration: 0.3s;
  transition-timing-function: ease-out;
}
.hvr-underline-from-center:hover:before, .hvr-underline-from-center:focus:before, .hvr-underline-from-center:active:before {
  left: 0;
  right: 0;
}
.stats .box {
  box-sizing: border-box;
  width: 120px;
  height: 99px;
  background: #F5E8DF;
  text-align: center;
  padding-top: 28px;
  transition: all .4s ease-in-out;
  color: #643a7a;
}
.box1 {
  animation: bg .5s ease-in-out;
}
.box2 {
  animation: bg .8s ease-in-out;
}
.box3 {
  animation: bg 1.1s ease-in-out;
}
@keyframes bg {
  0% {
  transform: translate(8rem);
  }
  100% {
    transform: translate(0);
  }
}
.stats .box:hover {
  cursor: pointer;
  color: #fff;
}
.hvr-underline-from-right {
  display: inline-block;
  vertical-align: middle;
  transform: perspective(1px) translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  position: relative;
  overflow: hidden;
}
.hvr-underline-from-right:before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 100%;
  right: 0;
  bottom: 0;
  background: #644e72;
  height: 99px;
  transition-property: left;
  transition-duration: 0.3s;
  transition-timing-function: ease-out;
}
.hvr-underline-from-right:hover:before, .hvr-underline-from-right:focus:before, .hvr-underline-from-right:active:before {
  left: 0;
}
.stats .box:nth-child(2) {
  margin: 1px 0;
}
.stats span {
  display: block;
}
.stats .value {
  font-size: 1.8rem;
  font-family: lobster;
}
.stats .parameter {
  font-size: 1rem;
  line-height: 1.2;
}
              
            
!

JS

              
                const path = document.querySelector('#wave');
const animation = document.querySelector('#moveTheWave');
const m = 0.512286623256592433;

function buildWave(w, h) {
  
  const a = h / 4;
  const y = h / 2;
  
  const pathData = [
    'M', w * 0, y + a / 2, 
    'c', 
      a * m, 0,
      -(1 - a) * m, -a, 
      a, -a,
    's', 
      -(1 - a) * m, a,
      a, a,
    's', 
      -(1 - a) * m, -a,
      a, -a,
    's', 
      -(1 - a) * m, a,
      a, a,
    's', 
      -(1 - a) * m, -a,
      a, -a,
    
    's', 
      -(1 - a) * m, a,
      a, a,
    's', 
      -(1 - a) * m, -a,
      a, -a,
    's', 
      -(1 - a) * m, a,
      a, a,
    's', 
      -(1 - a) * m, -a,
      a, -a,
    's', 
      -(1 - a) * m, a,
      a, a,
    's', 
      -(1 - a) * m, -a,
      a, -a,
    's', 
      -(1 - a) * m, a,
      a, a,
    's', 
      -(1 - a) * m, -a,
      a, -a,
    's', 
      -(1 - a) * m, a,
      a, a,
    's', 
      -(1 - a) * m, -a,
      a, -a
  ].join(' ');
  
  path.setAttribute('d', pathData);
}

buildWave(90, 60);

              
            
!
999px

Console