【问题标题】:DIV background image being cut off when zoomed out in firefox在Firefox中缩小时DIV背景图像被切断
【发布时间】:2013-04-17 23:56:14
【问题描述】:

我有一个高度/宽度为 15 像素的 DIV。 它还有一个高度/宽度为 15 像素的背景图像。 问题是当在 Firefox 中缩小某些级别时,背景图像在右侧和底部被切断了几个像素。 这是link 和下面的代码。尝试在 Firefox 中查看。

 <div id="custom-checkbox"></div>

 #custom-checkbox 
 { 
     background: url('http://s16.postimg.org/5xacziapd/unchecked.png') no-repeat; 
     width: 15px;
     height: 15px; 
 }

【问题讨论】:

标签: html css


【解决方案1】:

这是我能得到的最好的显示,其余的只是 Firefox 像素舍入。

    #custom-checkbox   
{   
    background: url('http://s16.postimg.org/5xacziapd/unchecked.png') no-repeat;   
    width: 15px !important;  
    height: 15px !important;  
    display:table;  
}  

希望这是我能做的最好的帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-11-26
    • 2021-05-21
    • 2017-03-07
    • 1970-01-01
    • 1970-01-01
    • 2022-11-17
    • 2013-06-21
    • 2016-04-25
    相关资源
    最近更新 更多