<html>
<head>
<title>div+css内部样式</title>
<style>
#a font,#c font{
color:green;
font-family:楷体;
font-size:80px;
}
.b font{
color:pink;
font-family:隶书;
font-size:80px;
}
</style>
</head>
<body>
<div id="a">
<font>河北</font><hr/>
</div>
<div class="b">
<font>供热</font><hr/>
</div>
<div id="c">
<font>和人</font><hr/>
<font>供热</font><hr/>
</div>
</body>
</html>
<head>
<title>div+css内部样式</title>
<style>
#a font,#c font{
color:green;
font-family:楷体;
font-size:80px;
}
.b font{
color:pink;
font-family:隶书;
font-size:80px;
}
</style>
</head>
<body>
<div id="a">
<font>河北</font><hr/>
</div>
<div class="b">
<font>供热</font><hr/>
</div>
<div id="c">
<font>和人</font><hr/>
<font>供热</font><hr/>
</div>
</body>
</html>
本文通过一个具体的实例展示了如何使用div和css实现内部样式的设置。包括为不同元素设置颜色、字体及大小等属性,适用于初学者了解基本的网页布局和样式控制。
3971

被折叠的 条评论
为什么被折叠?



