此代码后的任何 css 都不起作用,此 css 代码中的问题是什么,仅在 Firefox 中?
表单的 css 之后的页脚 css 不起作用,这段 css 代码有什么问题?
/*------------------------------------*\
FORMS */
fieldset { padding: 10px; border: 1px solid #ccc; margin-bottom: 1.5em; }
label { display: block; cursor: pointer; }
label:after { content:\": "; }
label::after { content:\": "; }
input,textarea { font-family: inherit; font-size: 1em; line-height: 1.5; }
[placeholder] { cursor: pointer; }
[placeholder]:active,[placeholder]:focus { cursor: text; }
fieldset > :last-child { margin: 0; }
footer {background:red; height:200px; width:200px}
jsfiddle 示例页脚中的jSfiddle http://jsfiddle.net/Aw239/
应该是红色背景。
Footer css after form's css is not working , what is the problem in this css code?
/*------------------------------------*\
FORMS */
fieldset { padding: 10px; border: 1px solid #ccc; margin-bottom: 1.5em; }
label { display: block; cursor: pointer; }
label:after { content:\": "; }
label::after { content:\": "; }
input,textarea { font-family: inherit; font-size: 1em; line-height: 1.5; }
[placeholder] { cursor: pointer; }
[placeholder]:active,[placeholder]:focus { cursor: text; }
fieldset > :last-child { margin: 0; }
footer {background:red; height:200px; width:200px}
jSfiddle http://jsfiddle.net/Aw239/
in jsfiddle example footer should be red background.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
至少 firefox 似乎不理解这个
label:after { content:\": ";我不知道这里发生了什么,但我只知道它是罪魁祸首。我从来没有真正正确地使用过内容。
但是,删除这些行,一切都会顺利进行..(或者按照凯尔所示重新格式化这两行,它应该这样做。)
似乎它不喜欢在与其他所有内容相同的行中添加结束分号
http://jsfiddle.net/Aw239/3/
或者..去掉
\
的?At least firefox Doesnt seem to understand this
label:after { content:\": "; }
i have no idea whats going on here but all i know is that it is the culprit. I've never actually used content properly.But, remove those lines and everything runs smoothly.. ( OR reformat those two lines as Kyle showed and it should do it. )
Seems like it doesnt like to have closing semicolons in the same row with everything else
http://jsfiddle.net/Aw239/3/
Or.. get rid of the
\
's ?我对你的 CSS 进行了一些格式化,它似乎可以在我的 FF5 中工作。 http://jsfiddle.net/Aw239/2/
I formatted your CSS a bit and it seems to work in my FF5. http://jsfiddle.net/Aw239/2/
它是红色的。你用的是IE8吗?因为如果您想要设置 HTML5 元素的样式,则需要使用 HTML5 shim。
这对你有用吗?
It is red. Are you using IE8? Because you'll need to use the HTML5 shim if you want to style HTML5 elements.
Does this work for you?