我想用底部透明三角形编码新闻的div边框,但左三角形边框不等于正确,你能解释一下为什么或让我知道其他方式来编码吗?三角形边框
我的代码:
.news {
\t position: relative;
\t margin: 75px auto;
\t width: 200px;
\t border: 1px #079199 solid;
\t padding: 20px;
\t
\t color: #bcbcbc;
\t
\t word-wrap: break-word;
\t
}
.news:after {
\t
\t position: absolute;
\t content: '';
\t border: 25px solid transparent;
\t border-top-color: #FFF;
\t
\t top: 100%;
\t left: 50%;
}
.news:before {
\t
\t position: absolute;
\t content: '';
border-left: 26px solid transparent;
border-right: 26px solid transparent;
border-top: 26px solid;
border-top-color: #079199;
\t
\t top: 100%;
\t left: 50%;
}
<div class="news">
TEST
</div>
也许我很困惑,但是哪里有_triangle_? – Psi