我的问题是我想使用指南针助手,我想使用图像宽度方法。我怎样才能做到这一点?我运行了命令compass init
,它为我制作了一些CSS文件和配置文件。我认为我必须导入compass/helpers
,但找不到吗?在此代码中,我希望在计算$bannerOneHeight
变量
$bannerOneWidth_pure
的真正宽度。 $bannerOneWidth_pure: image-width("../image/pop-1-2.png");
$bannerOneWidth: 300px;
$bannerOneHeight: calc(#{$bannerOneWidth}*(#{$bannerOneWidth_pure}/560));
尝试以下:
@import "compass";
@import "compass/helpers";