<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style>
#box{width:300px;height:90px;background:black;padding:10px 30px;}
.box2{border-top:1px dotted #ccc;
border-bottom:1px dotted #ccc;
width:300px;
height:30px;
line-height:30px;
color:white;}
</style>
</head>
<body>
<div id="box">
<div class="box2">视频课程</div>
<div class="box2">精品好课</div>
<div class="box2">成果检验</div>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style>
#box{width:300px;height:90px;background:black;padding:10px 30px;}
.box2{border-top:1px dotted #ccc;
border-bottom:1px dotted #ccc;
width:300px;
height:30px;
line-height:30px;
color:white;}
</style>
</head>
<body>
<div id="box">
<div class="box2">视频课程</div>
<div class="box2">精品好课</div>
<div class="box2">成果检验</div>
</div>
</body>
</html>
本文展示了一个使用HTML和CSS进行网页布局的例子。通过定义盒子的宽度、高度及背景色等样式,演示了如何创建一个包含多个子元素的盒子,并为这些子元素设置边框、颜色等样式。

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



