Pulsante Fumetto CSS3
Creazione di pulsanti e bottoni grazie a CSS3
HTML
<div class="speech-bubble speech-bubble-top">Ciao</div>
<div class="speech-bubble speech-bubble-bottom">Ciao</div>
<div class="speech-bubble speech-bubble-left">Ciao</div>
<div class="speech-bubble speech-bubble-right">Ciao</div>
CSS
.speech-bubble {
position: relative;
background-color: #fffff;
width: 200px;
height: 150px;
line-height: 150px;
text-align: center;
border-radius: 10px;
font-family: sans-serif;
margin: 2em auto;
}
.speech-bubble:after {
content: '';
position: absolute;
width: 0;
height: 0;
border: 15px ;
}
.speech-bubble-top:after {
border-bottom-color: #f5f5f5;
left: 50%;
bottom: 100%;
margin-left: -15px;
}
.speech-bubble-right:after {
border-left-color: #f5f5f5;
left: 100%;
top: 50%;
margin-top: -15px;
}
.speech-bubble-bottom:after {
border-top-color: #f5f5f5;
top: 100%;
left: 50%;
margin-left: -15px;
}
.speech-bubble-left:after {
border-right-color: #f5f5f5;
top: 50%;
right: 100%;
margin-top: -15px;
}