css 派生选择器
有如下代码:<html><head><styletype="text/css">p{color:red}p#tight{color:blue}</style></head...
有如下代码:
<html>
<head>
<style type="text/css">
p{color:red}
p#tight{color:blue}
</style>
</head>
<body>
<p>This is some text. This is some text.</p>
<p id="tight"><b>This is some text. This is some text.</b></p>
</body>
</html>
输出时字体显示蓝色:
但是将<p id="tight"><b>This is some text. This is some text.</b></p>中的<b>换为<h1>
显示时字体不变为蓝色,这是为什么呢?那位高手解释一下,小弟在此不胜感激!!! 展开
<html>
<head>
<style type="text/css">
p{color:red}
p#tight{color:blue}
</style>
</head>
<body>
<p>This is some text. This is some text.</p>
<p id="tight"><b>This is some text. This is some text.</b></p>
</body>
</html>
输出时字体显示蓝色:
但是将<p id="tight"><b>This is some text. This is some text.</b></p>中的<b>换为<h1>
显示时字体不变为蓝色,这是为什么呢?那位高手解释一下,小弟在此不胜感激!!! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询