直接复制代码实现
1.样式
2.代码如下
<html>
<head>
<title>我的第一个 HTML 页面</title>
<style>
.brand_total{
box-shadow:0px 0px 1px 2px #F0F0F0;
margin:0 auto ;
background-color: #F7F7F7;
width: 95%;
height: 8%;
text-align: center;
line-height: 30px;/*让黄色div中的文字内容垂直居中*/
margin-top: 2%;
color: #25397F;
}
.brand_total .titleName{
display: block;
float: left;
margin-left: 3px;
}
.brand_total .titlePoint{
display: block;
float: right;
margin-right: 3px;
}
/* 标题三角绘制品牌合格率*/
.brand_total .titlePoint{
height: 30px;
line-height: 30px;
position: relative;
padding-left:6px;
padding-top:17px;
float: right;
z-index: 0;
}
.brand_total .titlePoint:before {
content: "";
display: block;
position: absolute;
top: 50%;
right: 0;
width: 0;
height: 0;
border:8px solid;
margin-top: -12px;
border-color: transparent transparent transparent #25397F;
}
.brand_total .titlePoint:after{
content: "";
display: block;
position: absolute;
top: 50%;
right: 2px;
width: 0;
height: 0;
border:8px solid;
margin-top: -12px;
border-color: transparent transparent transparent #F0F0F0;
}
.brand_total .titlePointRigth{
height: 30px;
line-height: 30px;
position: relative;
padding: 10px;
float: right;
margin-left: 3px;
z-index: 0;
}
.brand_total .titlePointRigth:before {
content: "";
display: block;
position: absolute;
top: 50%;
right: 0;
width: 0;
height: 0;
border:8px solid;
margin-top: -12px;
border-color: transparent transparent transparent #25397F;
}
.brand_total .titlePointRigth:after{
content: "";
display: block;
position: absolute;
top: 50%;
right: 2px;
width: 0;
height: 0;
border:8px solid;
margin-top: -12px;
border-color: transparent transparent transparent #F0F0F0;
}
</style>
</head>
<body>
<div class="brand_total"><span class="titleName">品牌合格率TOP</span><span class="titlePoint"></span><span class="titlePointRigth"></span></div>
</body>
</html>
向右的两个箭头。具体使用:
同时修改这四个数值改变大小(箭头的长度)。
修改这个可以控制箭头的宽度。
然后颜色和方向可以随意修改