相关疑难解决方法(0)

由于另一个嵌套段落,段落忽略了样式

可能我的CSS知识有限,但我不明白这一点:

<p style="color: green">
    <p style="color: red">This is red</p>
    This should be green. But it's not.
</p>
Run Code Online (Sandbox Code Playgroud)

第二行将以黑色呈现,忽略"颜色:绿色".为什么?我在Chrome 28和Firefox 22中进行了测试.

html css

14
推荐指数
2
解决办法
389
查看次数

标签 统计

css ×1

html ×1