<div class="box">
<div class="badge badge-top-right"><span>POPOLARE</span>
</div>
@import url(https://fonts.googleapis.com/css?family=Lato:700);
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #f0f0f0;
}
.box {
position: relative;
max-width: 600px;
width: 90%;
height: 400px;
background: #fff;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}
/* la base */
.badge {
width: 150px;
height: 150px;
overflow: hidden;
position: absolute;
}
.badge::before,
.badge::after {
position: absolute;
z-index: -1;
content: "";
display: block;
border: 5px solid #2980b9;
}
.badge span {
position: absolute;
display: block;
width: 225px;
padding: 15px 0;
background-color: #3498db;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
color: #fff;
font: 700 18px/1 "Lato", sans-serif;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
text-transform: uppercase;
text-align: center;
}
/* in alto a destra */
.badge-top-right {
top: -10px;
right: -10px;
}
.badge-top-right::before,
.badge-top-right::after {
border-top-color: transparent;
border-right-color: transparent;
}
.badge-top-right::before {
top: 0;
left: 0;
}
.badge-top-right::after {
bottom: 0;
right: 0;
}
.badge-top-right span {
left: -25px;
top: 30px;
transform: rotate(45deg);
}
<!-- by Perone Luigi -->
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.