Skip to content

Instantly share code, notes, and snippets.

@jsnfwlr
Created June 30, 2020 23:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsnfwlr/d4ea95216e53d8d8b6f99b28b8815fd8 to your computer and use it in GitHub Desktop.
Save jsnfwlr/d4ea95216e53d8d8b6f99b28b8815fd8 to your computer and use it in GitHub Desktop.
<div id="bar">
<div id="wave"/><div/>
</div>
<style>
#bar {
background: #00F;
height: 120px;
position: relative;
overflow: hidden;
}
#wave {
height: 50%;
width: 100%;
background: #F00;
overflow: hidden;
}
#wave::before {
content: "";
display: block;
position: absolute;
border-radius: 100% 50%;
width: 75%;
height: 75%;
background-color: #00F;
right: -18.5%;
bottom: calc((100% / 200) - (100% / 1000));
}
#wave::after {
content: "";
display: block;
position: absolute;
border-radius: 100% 50%;
width: 75%;
height: 75%;
background-color: #F00;
left: -18.5%;
top: calc((100% / 200) - (100% / 1000));
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment