习惯在 background 写一堆属性,但是 CSS3 新增的属性 background-size 怎么写进 background 里面呢?
1
droiz 2016 年 10 月 10 日
background-position 和 background-size 之间用 / 分开。
例如 30px 40px / 20px 30px |
2
yangg 2016 年 10 月 10 日
目前来说,为了兼容性,不建议合并,大概记得以前用 的 iphone 4s 还是 4 来着,不支持合并的缩写,
所以现在 cleancss 的压缩工具都有 backgroundSizeMerging 选项配置, https://github.com/jakubpawlowicz/clean-css#how-to-set-a-compatibility-mode |