css伪类实现小三角
作者:
放下手机出来嗨 | 来源:发表于
2019-06-06 10:55 被阅读0次<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
.box{position: relative; width: 200px;height: 100px;border: 1px solid red;border-radius:3px;text-align:center; line-height:100px;}
.box::after{
content: '';
position: absolute;
right: -19px;
top: 16px;
border: 10px solid transparent;
border-left-color:white;
}
.box::before{
content: '';
position: absolute;
right: -20px;
top: 16px;
border: 10px solid transparent;
border-left-color: red;
}
</style>
</head>
<body>
<div class="box">
o(^▽^)o
</div>
</body>
</html>
本文标题:css伪类实现小三角
本文链接:https://www.haomeiwen.com/subject/mqhlxctx.html
网友评论