Triangle Tooltip
Pure css Triangle Tooltip
by Shane Lambert
HTML
<div class="tip">
Lorem ipsum dolor sit amet...
</div>
CSS
/* base CSS element */
.tip {
background: #00a2e8;
padding: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
margin: 30px;
position: relative;
width: 300px;
}
/* arrows - :before and :after */
.tip:before {
position: absolute;
bottom: -15px;
left: 98px;
display: inline-block;
border-right: 15px solid transparent;
border-top: 15px solid #00a2e8;
border-left: 15px solid transparent;
border-top-color: rgba(150, 150, 150, 0.3);
content: '';
}
.tip:after {
position: absolute;
bottom: -14px;
left: 99px;
display: inline-block;
border-right: 8px solid transparent;
border-top: 8px solid #00a2e8;
border-left: 8px solid transparent;
content: '';
}