伪元素的妙用
一:对勾
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>对勾</title>
<style>
*, :after, :before {
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
a {
text-decoration: none;
}
.message {
text-align: center;
}
.success {
font-size: 16px;
font-weight: 600;
color: #42c02e;
}
.success:before {
content: '';
display: inline-block;
width: 18px;
height: 10px;
border-width: 0 0 4px 4px;
border-style: solid;
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
position: relative;
bottom: 4px;
right: 8px;
}
</style>
</head>
<body>
<div class="message">
<a href="#" class="success">发布成功,点击查看文章</a>
</div>
</body>
</html>
认真对待每一天,加油