首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

请问个css的有关问题,为什么p元素不受css影响哦

2013-02-19 
请教个css的问题,为什么p元素不受css影响哦?大家看下下面的html,发现p元素中的数据不受css影响,为什么呀?

请教个css的问题,为什么p元素不受css影响哦?
大家看下下面的html,发现p元素中的数据不受css影响,为什么呀?

<html>
<head>
<style type="text/css">
h1 {font-family:Georgia;}
</style>
</head>

<body>
<h1>This is heading 1</h1>

<p>This is a paragraph.</p>

<p>This is a paragraph.</p>

<p>...</p>
</body>
</html>

[解决办法]
你只是给h1标签加样式,没有给P标签加样式,当然没有影响,改成下面试下。

h1 ,p{font-family:Georgia;}

热点排行