5
我正在使用inline-image
函数来创建图标类。这是我目前SCSS:SCSS - 获取图像尺寸
.folder {
background: inline-image("icons/home/folder.png", 'image/png') no-repeat center;
height: 30px;
width: 41px;
}
我要寻找的是能够确定图像的宽度和高度,所以我可以做这样的事情的函数:
.folder {
background: inline-image("icons/home/folder.png", 'image/png') no-repeat center;
height: image-height("icons/home/folder.png", 'image/png');
width: image-width("icons/home/folder.png", 'image/png');
}
是否像这样的东西存在吗?
只是不导入辅助功能。这真棒罗盘可以产生精灵。将转而转向精灵。谢谢您的帮助! – sissonb 2012-03-16 19:36:43
我相信有一个失踪; @import“compass/helpers”之后。没有它就不会编译。 – 2014-03-22 20:38:29
谢谢@ArthurAlvim – welldan97 2014-03-23 19:19:50