+ -
当前位置:首页 → 问答吧 → html初哥求教

html初哥求教

时间:2014-05-04

来源:互联网

<head>
<style>
p {color:red}
</style>
</head>

<body>
<p style="color:blue"> xxxxxxxxxxxx </p>
</body>

why最后paragraph display出黎是蓝色
想知browser读html的模式
有无ching明我up咩

[ 本帖最后由 vinclavv 於 2014-4-21 09:57 PM 编辑 ]

作者: vinclavv   发布时间: 2014-05-04

引用:原帖由 vinclavv 於 2014-4-21 09:56 PM 发表
<head>
<style>
p {color:red}
</style>
</head>

<body>
<p style="color:blue"> xxxxxxxxxxxx </p>
</body>


why最后paragraph display出黎是蓝色
想知browser读html的模式
有无ching明我up咩
style系有优先次序,以你既例子来讲
如果style系tag level defines左,browser会用tag level 既style (color:blue)
如果style系tag level 无defines,browser会用global level 既style (color:red)

作者: McLoneIII   发布时间: 2014-05-05