css - 如何为 LESS CSS 应用 IE 修复

标签 css html-parsing less

如何在 less css 中使用 ie 9 hack?

ie 9 hack\0/

编译错误

以下字符是异常(exception)且未编码:,,/, ?, @, &, +, ', ~, !和 $.

如何对这些字符进行编码?

最佳答案

你不能......要么像@Blender建议的那样使用Modernizr,要么在你的标记中附加ie9类使用:

<!--[if IE 9]><script>document.documentElement.className += " ie9";</script><![endif]-->

并在 LESS 中使用 ie9 特定规则:

.ie9 & { /* IE9 rules */ }

关于css - 如何为 LESS CSS 应用 IE 修复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18286485/

相关文章:

html - 为什么我的填充仅在元素处于悬停状态时显示?

javascript - Croppic.net 图像尺寸错误且无法裁剪

html - 强制子 div 宽度匹配父 div 宽度

java - 使用 W3C 文档对象模型如何为特定文本插入标签

php - PHP 网页抓取

visual-studio-2013 - 如何从发布中排除 .less 文件?

jquery - 动画 - Css 中的 scrollTop

javascript - 我如何在 React Native 中解析 HTML 文件?

css - 兼容性,优点少了 css

css - 背景:透明;与背景:0 0;差异和威胁