火狐忽略背景大小的CSS [英] firefox ignores background-size css

查看:166
本文介绍了火狐忽略背景大小的CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用CSS规则缩小图像大小,但似乎被Firefox 3.5忽略

b b CSS

  .privatejoker {
背景:aqua url(../ styles / images / home-privatejoker.png)no-重复0 0;
background-size:365px 341px;
height:341px;
margin:0 auto;
display:block;
margin-top:-6px;

$ / code>


解决方案

background-size 被添加到Firefox 3.6中,但是需要 -moz 供应商前缀



从版本4开始,它不再是必需的。如果你也想支持Firefox 3.6,除了正常的属性之外,还要包含供应商的前缀。



Joseph 进一步阅读在MDN。


Trying to scale an image down using the background-size CSS rule but seems to be ignored with Firefox 3.5

CSS

.privatejoker {
    background: aqua url("../styles/images/home-privatejoker.png") no-repeat 0 0;
    background-size: 365px 341px;
    height:341px;
    margin: 0 auto;
    display:block;
    margin-top: -6px;
    }

解决方案

background-size was added to Firefox 3.6, however the -moz vendor prefix was required.

Since version 4, it is no longer required. If you want to support Firefox 3.6 too, include the vendor prefix in addition to the normal property.

Joseph provides a good link for further reading at MDN.

这篇关于火狐忽略背景大小的CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆