0
左の三角形でブロックを作成しています。私は別の三角形に1つの三角形を適用することでこれを作った。しかし、三角形の境界線は1pxではなく2pxになっています。それを修正するには?あなたは他の実装方法を知っているかもしれませんか?どうもうありがとう.............................................. .......................... ....................... ............. ....................................div付きトライアングル
#crumbs ul li a {
display: block;
float: left;
height: 50px;
background: #fff;
text-align: center;
height: 110px;
width: 180px;
position: relative;
margin: 0 10px 0 0;
font-size: 20px;
text-decoration: none;
color: #fff;
border: 1px solid #e6e6e6;
}
#crumbs ul li{
list-style:none;
}
#crumbs ul li a:before {
content: '';
border-top: 56px solid transparent;
border-bottom: 56px solid transparent;
border-right: 13px solid #e6e6e6;
position: absolute;
left: -13.7px;
top: -1px;
z-index: 2;
}
#crumbs ul li a:after {
content: '';
border-top: 55px solid transparent;
border-bottom: 55px solid transparent;
border-right: 11px solid #fff;
position: absolute;
left: -11.5px;
top: 0px;
z-index: 2;
}
#crumbs ul li a span:before {
content: '';
position: absolute;
top: 50%;
left: -6px;
width: 6px;
height: 6px;
margin-top: -4px;
border: 1px solid #e6e6e6;
background: #fff;
border-radius: 50%;
z-index: 99;
}
<div id="crumbs">
<ul>
<li>
<a href="#">
<span></span>
<img src="1.png" alt="" />
</a>
</li>
</ul>
</div>
問題ありません!ところで、小数点以下のピクセル値を避けてみてください。これは一般的には良いことではありません:) – Maharkus