ZXJ03
2016-10-29 11:21

我的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;
}
你再看看你的html代码。。。
从 psd 到 html
105539 学习 · 466 问题
相似问题