Skip to content

Instantly share code, notes, and snippets.

@stanwmusic
Created August 11, 2020 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stanwmusic/b4fd004e6cdc41e3bf5bb1a696dc76cd to your computer and use it in GitHub Desktop.
Save stanwmusic/b4fd004e6cdc41e3bf5bb1a696dc76cd to your computer and use it in GitHub Desktop.
Vintage Coffee
<head>
<link href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Vidaloka&family=Yesteryear&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Oswald:wght@300&display=swap" rel="stylesheet">
</head>
<div class="frame">
<p><i class="fas fa-star" style="font-size: 15px;"></i> Premie Yum <i class="fas fa-star" style="font-size: 15px;"></i></p>
<h2>Coffee</h2>
<div class="ribbon">
<h3>COLLECTION</h3>
</div>
</div>
body{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
width: 100vw;
background: #e6e6d8;
margin: 0;
box-shadow: inset 0 0 30px #333;
}
.frame {
width: 30%;
height: 40%;
margin: auto;
text-align: center;
}
h2 {
position: relative;
text-align: center;
color: #353535;
font-size: 80px;
font-family: 'Vidaloka', serif;
margin: 0;
}
p {
/*font-family: 'Yesteryear', cursive;*/
font-family: 'Oswald', sans-serif;
font-weight: 300;
text-align: center;
font-size: 40px;
color: #464646;
margin: 0;
}
.ribbon {
display: inline-block;
position: relative;
height: 30px;
text-align: center;
box-sizing: border-box;
}
.ribbon:before {/*左側のリボン端*/
content: '';
position: absolute;
width: 10px;
bottom: -6px;
left: -25px;
z-index: -2;
border: 13px solid #464646;
border-left-color: transparent;/*山形に切り抜き*/
}
.ribbon:after {/*右側のリボン端*/
content: '';
position: absolute;
width: 10px;
bottom: -6px;
right: -25px;
z-index: -2;
border: 13px solid #464646;
border-right-color: transparent;/*山形に切り抜き*/
}
.ribbon h3 {
display: inline-block;
position: relative;
margin: 0;
padding: 0 20px;
line-height: 30px;
font-family: 'Oswald', sans-serif;
font-size: 20px;
color: #FFF;
background: #353535;/*真ん中の背景色*/
}
.ribbon h3:before {
position: absolute;
content: '';
top: 100%;
left: 0;
border: none;
border-bottom: solid 6px transparent;
border-right: solid 11px #222;/*左の折り返し部分*/
}
.ribbon h3:after {
position: absolute;
content: '';
top: 100%;
right: 0;
border: none;
border-bottom: solid 6px transparent;
border-left: solid 11px #222;/*右の折り返し部分*/
}
@stanwmusic
Copy link
Author

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