Skip to content

Instantly share code, notes, and snippets.

@khalidmesbah
Created October 22, 2021 18:31
Show Gist options
  • Save khalidmesbah/74e1d0942909c1460df7743389f10795 to your computer and use it in GitHub Desktop.
Save khalidmesbah/74e1d0942909c1460df7743389f10795 to your computer and use it in GitHub Desktop.
creative ribbon shape
<div class="card">
<span></span>
</div>
body {
font-family: "Trebuchet MS", "Lucida Sans Unicode", sans-serif;
background-color: #efe;
display: grid;
place-content: center;
min-height: 100vh;
margin: 0;
}
.card {
width: 300px;
height: 450px;
box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px,
rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px,
rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
border-radius: 30px;
position: relative;
}
.card::after {
content: "hello and welcome!";
display: grid;
place-content: center;
font-size: 20px;
text-transform: capitalize;
color: pink;
position: absolute;
height: 50px;
width: 250px;
border-radius: inherit;
background-color: red;
inset: 100px auto auto -25px;
}
.card::before {
box-sizing: border-box;
position: absolute;
content: "";
width: 25px;
height: 50px;
border: 10px solid #f66;
border-radius: 35px 0 0 35px;
background-color: #f66;
inset: 150px auto auto -25px;
z-index: 1;
}
span {
position: absolute;
width: 20px;
height: 40px;
background-color: red;
inset: 130px auto auto -25px;
}
@khalidmesbah
Copy link
Author

finally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment