<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
div {
width: 150px;
height: 20px;
background-color: orchid;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
/*margin简写属性在一个声明中设置所有外边距属性。
该属性可以有1到4个值。
实例:
margin:10px 5px 15px 20px;
上边距是 10px 右边距是 5px 下边距是 15px 左边距是 20px */
}
.more {
position: absolute;
left: 8px;
top: 8px;
background: -webkit-linear-gradient(left, #ff506c, #FF6Bc6);
border-radius: 15px;
padding: 3px 20px 3px 10px;
}
.more::after {
content: '';
position: absolute;
top: 7px;
right: 9px;
width: 7px;
height: 7px;
border-top: 2px solid #fff;
border-right: 2px solid #fff;
transform: rotate(45deg);
/*顺时针旋转45度*/
}
a{
text-decoration: none;
/*取消a标签超链接下划线*/
color: #fff;
}
</style>
</head>
<body>
<!-- <div style="background: pink;width: 300px;height: 500px;"> -->
<div class="more"><a href="#">more about this</a></div>
</body>
</html>
CSS_rotate应用按钮右三角形样式
猜你喜欢
转载自blog.csdn.net/qq_42526440/article/details/111457812
今日推荐
周排行