效果:
html:
<div class="help-tip">
<p>电话号码格式不正确</p>
</div>
css:
.help-tip::after{
display: block;
content:"";
width: 8px;
height: 8px;
background: #88847f;
transform: rotate(-45deg); /*兼容FF和IE*/
-webkit-transform:rotate(-45deg);
position: absolute;
right: 115px;
top: -4px;
}
.help-tip{
width: 140px;
height: 25px;
display: block;
position: absolute;
text-align: center;
right: 30px;
border-radius: 4px;
background: #88847f;
}
.help-tip p{
color: #fff;
font-size: 12px;
margin:5px;
}