2014-09-26 93 views
0

我有这个问题,Firefox和IE拒绝在图像后面渲染边框,无论我做什么,而Chrome和Opera都不错。我已经把包含箭头的div移到了这个地方,甚至试图用z-index强制它,但它不会让步。有什么建议?CSS边框渲染优先

铬/ Opera和IE/Firefox的:

enter image description here

我有一个的jsfiddle设置在这里:http://jsfiddle.net/3Lqoxv2r/

CSS:

html { 
    height: 100%; 
    background: #eee; 
} 

body { 
    background: url(../img/background.jpg); 
    background-repeat: no-repeat; 
    background-size: cover; 
    margin: 0px; 
    height: 100%; 
    overflow: hidden; 
    background-position: center; 
    font-family: Helvetica; 
} 

body.welcome { 
    background: url(../img/welcome_background.jpg); 
    background-size: cover; 
    background-position: center; 
} 

p { 
    margin: 0px; 
} 

::-webkit-scrollbar { 
    width: 1px; 
} 

.wrapper { 
    overflow-y: scroll; 
    height: calc(100% - 90px); 
} 

header { 
    position: static; 
    top: 0; 
    height: 60px; 
} 
header .logo { 
    float: left; 
    width: 256px; 
} 
header .logo .container { 
    padding: 0 0 0 128px; 
    height: 60px; 
    background: white; 
} 
header .logo .container img { 
    margin: 13px 0 0 0; 
    width: 63px; 
    height: 66px; 
    filter: hue-rotate(0deg); 
    -webkit-filter: hue-rotate(0deg); 
    -moz-filter: hue-rotate(0deg); 
    -o-filter: hue-rotate(0deg); 
    -ms-filter: hue-rotate(0deg); 
} 
header .menu { 
    float: left; 
    background: white; 
    width: calc(100% - 256px); 
    height: 100%; 
} 
header .menu nav { 
    float: left; 
} 
header .menu nav ul { 
    list-style-type: none; 
    margin: 0; 
    padding: 0; 
} 
header .menu nav ul li { 
    float: left; 
    width: 128px; 
    line-height: 57px; 
    letter-spacing: -2px; 
    text-align: center; 
    font-size: 19px; 
    text-transform: uppercase; 
    color: #8a8a8a; 
    border-top: 3px solid white; 
} 
header .menu nav ul li.active { 
    color: #f05555; 
    border-top: 3px solid #f05555; 
} 
header .menu .container { 
    float: right; 
    padding-right: 128px; 
} 

.before { 
    content: ""; 
    position: absolute; 
    top: 60px; 
    left: 130px; 
    border-top: 23px solid white; 
    border-left: 28px solid transparent; 
    border-right: 28px solid transparent; 
} 

div.content { 
    width: 100%; 
    height: calc(100% - 90px); 
} 
div.content .menu { 
    height: 50px; 
} 
div.content .container { 
    overflow-y: scroll; 
    height: 100%; 
    margin: 0 128px 0 128px; 
    width: calc(100% - 256px); 
    background: white; 
} 

footer { 
    position: static; 
    bottom: 0; 
    height: 30px; 
    background: white; 
    padding: 0 0 0 128px; 
    line-height: 30px; 
    font-size: 10px; 
    color: #8a8a8a; 
} 

回答

2

您已经使用position: staticheader标签。相反,使用position: relative,它将在ff和IE11中工作。