border三角形
一、三角形选框
border实际上是由三角形组成的。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
div{
height: 40px;
width: 100px;
text-align: center;
line-height: 40px;
color: green;
border-bottom: 1px solid green;
}
div:before{
content: "";
border: 8px solid transparent;
border-bottom-color: green;
display: block;
position: absolute;
left:50px;
top: 33px;
}
div:after{
content: "";
border: 8px solid transparent;
border-bottom-color: white;
display: block;
position: absolute;
left:50px;
top: 35px;
}
</style>
</head>
<body>
<div>登录</div>
</body>
</html>