<style>
a{
display: block;
width: 50px;
height: 50px;
padding: 0 20px;
background: #000;
text-decoration: none;
text-align: center;
line-height: 50px;
color: #fff;
}
a .icon_more{
display: inline-block;!!!
vertical-align: middle;
width: 0;
height: 0;
border: 5px solid transparent;/*5px 足够了*/
border-top-color:#000;/*top箭头向下 bottom箭头向上*/
}
a:hover .icon_more{
transform:rotate(180deg);
transition: .2s ease-in;
}
</style>
</head>
<body>
<a href="">更多
<span class="icon_more"></span>
</a>
</body>
<style>
.card_head_btn{
display: flex;
align-items: center;
justify-content: center;
height: 25px;
font-size: 14px;
color: rgb(208, 210, 255);
padding: 0px 18px;
position: relative;
cursor: pointer;
min-width: 62px;
background: rgba(83, 215, 230, 0.1);
border: 1px solid rgba(255, 255, 255, 0.5);
}
.card_head_btn.small{
height: 24px;
line-height: 24px;
font-size: 12px;
padding: 0px 14px 0;
}
.card_head_btn::before {
content: "";
position: absolute;
top: -1px;
left: -1px;
width: 8px;
height: 8px;
border-top: 3px solid #ffffff;
border-left: 3px solid #ffffff;
}
</style>
<div class="card_head_btn small"> 交易类 </div>
<style type="text/css">
.icon_arrow:before {
content: '';
display: inline-block;
border: 6px solid transparent;/*5px 足够了*/
border-right-color:#333;/*right箭头向左 top箭头向下*/
position: absolute;
top: 0%;
left: 0px;
margin-top: -6px;
}
</style>
<span class="icon_arrow"></span>
CSS实现大于号箭头,而不是直接使用键盘上的尖括号“>”
在这个方法中,是用到了matrix这个CSS3的属性,对于这个属性,可以参考理解CSS3 transform中的Matrix(矩阵)这篇文章。
.checkdetails:after {
content: " ";
display: inline-block;
height: 10px;
width: 10px;
border-width: 2px 2px 0 0;
border-color: #000;
border-style: solid;
-webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
position: absolute;
}