简体   繁体   English

CSS:body {}选择器不工作

[英]CSS: body { } Selector not Working

This is the whole document: 这是整个文件:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Title</title>

    <style type="text/css">
        body‌ {
            font-family: Tahoma;
            font-size: 8px;
            background: #f00;
        }
    </style>
</head>

<body>
    Sample Text
    <p>Another Text</p>
</body>
</html>

And in jsfiddle: http://jsfiddle.net/HDBqZ/ 并在jsfiddle: http//jsfiddle.net/HDBqZ/

Why it's not working? 为什么它不起作用? Am I missing something? 我错过了什么吗?

There seems to be some junk after the y in your body { selector: 在你body {y后面似乎有一些垃圾 body {选择器:

>>> u'body‌'
u'body\u200c'

Delete your body line and re-write it by hand. 删除您的body线并手动重写。 Your text editor should have some tool to get rid of these things automatically as well. 你的文本编辑器应该有一些工具来自动摆脱这些东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM