So I have a body here:

所以我有一个身体

 <body>
 <div id=”first”>
    <span class=”red”>This is a DIV Container</span>

    Or
    <br>
    This
</div>

And I have a style sheet with this

我有一个样式表

#first{
    background-color:red;
}

But the background color doesn't change. I have no idea what I'm doing wrong...

但是背景颜色不会改变。我不知道我做错了什么……

Here's a jsfiddle with the code

这是一个带有代码的jsfiddle。

https://jsfiddle.net/fuz5uqfb/

https://jsfiddle.net/fuz5uqfb/

Doesn't worth there either.

不值得。

1 个解决方案

#1


5

You're using the wrong kind of quotation marks for your div id and span class. It should be this:

您正在使用错误的类型的引号为您的div id和span类。它应该是这样的:

<body>
    <div id="first">
        <span class="red">This is a DIV Container</span>

        Or
        <br>
        This
    </div>
</body>

Updated Fiddle

更多相关文章

  1. 如何控制html代码中DL标签的颜色?
  2. 有没有办法从指定的网站找到某种颜色的图像?
  3. php单引号和双引号的区别
  4. 单引号,双引号,javascript,HTML,转义字符
  5. PHP & GD -透明背景填充附近的颜色。
  6. fgetcsv()错误地将双引号添加到第一行的第一个元素
  7. mysql where in形式存储过程如何传递带有单引号的入参
  8. 使用Jquery Ajax更改按钮的颜色(从外部PHP文件接收颜色)
  9. 对象的属性也要加引号吗

随机推荐

  1. Android的建议
  2. Android SVG矢量图
  3. Android USB 开发详解
  4. Android API版本对应Android系统版本及内
  5. Android C/C++开发指南
  6. Android入门教程 (一) Android简介和androi
  7. 4.0.x Launcher UI
  8. [原]如何在Android用FFmpeg+SDL2.0解码图
  9. android:ellipsize属性 textview
  10. Android异步消息处理机制