为什么我的三角会偏离位置?
我的css和老师一样,但是为什么会偏离位置?
.index-menu{ border-top:6px solid #f34949; position: relative; } .index-menu .menu-tips{ position: absolute; top: 0; left: 50%; margin-left: -78px; width: 156px; height: 71px; background: #f34949; color: #fff; text-align: center; line-height: 65px; font-size: 20px; } .index-menu .menu-tips:after{ width: 0; height: 0; content: ""; position: absolute; bottom: 0; left: 0; border-left: 78px solid transparent; border-right: 78px solid transparent; border-bottom: 10px solid #fff; }