Rails Assets precompile 无法编译通过-CSS hack

gklld · March 15, 2013 · Last by chenge replied at March 22, 2013 · 2797 hits

为了对 IE7 浏览器进行兼容,写了这么一句 CSS 语句:+margin-top:10px; 实际运行是达到预期效果的,当我对 rails 程序进行 precomile 的时候就报错了,去掉就可以了。有没有遇到这样的问题?该怎么解决?

+margin-top 是什么用法?

#1 楼 @Rei 能够让 IE7 识别的语法

你确定是那个引起的?我记得 assets precompile 出错的时候不会提示那个部位有错误的

你是写到.scss 文件里的 Hack 吧,把.scss 去掉,纯 css 文件

#4 楼 @deathdealer 是纯 css 文件里写的

这样的错误: Invalid CSS after " +display:": expected pseudoclass or pseudoelement, was " block;"

我猜是不是 +display: 沒有放在 {} 裏面?看這個錯誤訊息是說他預期看到 :first-child:after 這種東西

precomiles 是什么,我怎么没遇到过。

You need to Sign in before reply, if you don't have an account, please Sign up first.