开发者

css background image only working in chrome and safari?

hey guys, i cannot find an answer.

body {
    background: #fff url('images/years.png') no-repeat top 85%;
}

why is this background image 开发者_运维技巧working in chrome and safari but not in firefox and ie? any idea what could cause that behaviour?

It seems like background-position is causing the bug! top 85% work in chrome and safari, but do not in IE and firefox!


Your background-position isn't logical. You should write 85% top (X then Y). I know 'top' can't define a X position and Chrome/Safari probably figure this out, but Firefox/IE don't understand it.


Apparently they don't like the compact syntax. Use:

background-color: #fff;
background-image: url('images/years.png');
background-position: top 85%;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜