看看这个简单的例子:
<style> h1 { color: red; } </style> <h1>this is the 'h1'.<h2>this is the 'h2'</h2></h1>
我预计'h2'内的字符串颜色为红色,但仍然是黑色.
这让我困惑了一段时间.为什么会这样?
html css
css ×1
html ×1