可能这个问题之前也在这里被问过。不幸的是,我没有找到最佳答案。更改此 iCheck 库的输入大小的方法是什么,因为它对我的网站来说太大了。
CSS:
.icheckbox_flat-blue,
.iradio_flat-blue {
display: inline-block;
*display: inline;
vertical-align: middle;
margin: 0;
padding: 0;
width: 20px;
height: 20px;
background: url(blue.png) no-repeat;
border: none;
cursor: pointer;
}
HTML:
<div class="sep_checkbox sep_primary">
<label><input type="checkbox" value="">Google hybrid</label>
</div>
<div class="sep_checkbox sep_primary">
<label><input type="checkbox" value="">Google terrain</label>
</div>
如果我改变宽度或高度,它不会正确显示背景。只显示它的一部分。有什么建议么?感谢您的帮助。
JSFIDDLE:https://jsfiddle.net/qhw3s7zz/
最佳答案
在 icheck 目录中有一个皮肤文件夹,其中包含您正在使用的名称为(green.png,red.png)颜色的复选框 Sprite 。只需在 photoshop 中打开它并在那里调整它的大小。
如果你使用上面类的代码调整它的大小,它会在你悬停时生效,并会在你选择它时改变检查的位置。
关于css - iCheck 库输入大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36431850/