css 标准流下的盒子模型

<!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>css盒子模型</title>
</head>
<style type="text/css">
ul{
  background:#ddd;
  margin:15px 15px 15px 15px;
  padding:5px 5px 5px 5px;
}
li{
  color:black;
  background:#aaa;
  margin:20px 20px 20px 20px;
  padding:10px 10px 10px 10px;
  list-style:none;
}
li.withborder{
   border-style:dashed;
   border-width:5px;
   border-color:black;
   margin-top:20px; 
}
</style>
<body>
 <ul>
   <li>
    第1个列表的第1个项目的内容
   </li>
   <li class="withborder">
    第1个列表的第2个项目的内容,内容长些,目的是演示自动折行的效果。
   </li>
 </ul>
 <ul>
   <li>
   第2个列表的第1个项目的内容
   </li>
   <li class="withborder">
    第2个列表的第2个项目的内容,内容长些,目的是演示自动折行的效果。
   </li>
 </ul>
</body>
</html>

相关文章:

  • 2021-05-20
  • 2021-06-19
  • 2022-12-23
  • 2021-12-01
  • 2021-06-04
  • 2021-08-19
  • 2021-11-24
猜你喜欢
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-03-26
  • 2021-08-30
  • 2021-09-08
相关资源
相似解决方案