我曾使用CSS的border-image
属性来实现菜单栏的某些效果,在Firefox中运行良好,但在Chrome中无法正常工作。
请参见www.imptools.com。有什么解决Chrome问题的方法吗?
CSS
nav.mainMenu{
width:@16cols; height: 50px;
margin:0 auto; position: relative;
top:-25px;
ul{
width:100%; height:50px; overflow: visible;
background: url('../imgs/gun_metal.png');
border-radius: 15px; box-shadow: 0px 3px 3px @dark;
li{
float:left; width: auto;
margin: 0 20px; overflow: visible;
height: 80px; position:relative; top:-15px;
a{
width: auto; height: auto;
float:left; padding: 0 15px;
font-family: @sansSec;
color:@light;
line-height: 80px;
font-size: 24px;
font-weight: bold;
text-shadow: 3px 3px 3px @dark;
}
}
li.active, li:hover{
background: @primary;
border-radius: 15px 0 15px 15px;
border-image:url(../imgs/menu_active_bg.png);
border-image-width:15px 15px 0px 0px;
border-image-outset: 0px 15px;
}
}
border-image
。显然,border-color: transparent;
优先于border-image-source
。但是,在border-image-source
之前设置border: 50px solid
似乎对Safari和Chrome都有效。 - Jacob Ford