<!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=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#container {
background-color: #CCC;
height: auto;
width: 100%;
}
#container #box1 {
background-color: #096;
height: 200px;
width: 200px;
margin-left:auto;
margin-right:auto;
}
</style>
</head>
<body>
<div id="container">
<div id="box1">盒子内容,我想让这个小盒子在大盒子中水平居中,如何处理</div>
</div>
</body>
</html>
子盒子居中
最新推荐文章于 2023-07-03 22:05:19 发布