5

I am using CSSLint for the first time and trying it now. When I write following CSS

.div {
    box-sizing: border-box;
    border: 1px solid red;
    padding: 5px;
    width: 100px;
}

Then when I run Warning - The box-sizing property isn't supported in IE6 and IE7.

I also changed "box-sizing": false to "box-sizing": true in my .csslintrc file.

But I am still getting this warning. How can I solve this problem?

4

2 回答 2

7

我相信正确的标志是--ignore=box-sizing,所以

csslint --ignore=box-sizing css/

不确定如何在.csslintrc中设置它,但如果您使用的是SublimeLinter-csshint包,您可以在 SublimeLinter 包设置中设置标志。

您还可以像这样从 csslint v0.9.10 开始将选项添加到 CSS 文件本身(不要添加任何空格):

/*csslint box-sizing: false*/
于 2015-04-12T10:55:15.183 回答
-1

您可以像这样从命令行关闭盒子模型警告:

csslint --ignore=box-model test.css

或者在 .csslintrc 文件中添加以下内容:

--ignore=box-model

文档

于 2014-06-19T16:28:55.350 回答