码迷,mamicode.com
首页 > 其他好文 > 详细

div 叠在一起 给上不同的颜色

时间:2016-04-19 06:08:40      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:

<html>
<head>
 <style>
 .one{
  width:300px;
  height:300px;
  background:red;
  margin:0 auto;
  margin-top:200px;
 }
 .two{
 width:275px;
 height:275px;
 background:black;

 }
 .three{
 width:250px;
 height:250px;
 background:yellow;
 
 }
 .four{
 width:225px;
 height:225px;
 background:green;
 }
 .five{
 width:200px;
 height:200px;
 background:blue;
 }
 .six{
 width:175px;
 height:175px;
 background:#333333;
 }
  .seven{
 width:150px;
 height:150px;
 background:#00FF00;
 }
  .eight{
 width:125px;
 height:125px;
 background:#1E90FF;
 }
  .nine{
 width:100px;
 height:100px;
 background:#48D1CC;
 }
  .ten{
 width:75px;
 height:75px;
 background:#8B0000;
 }
  .Q{
 width:50px;
 height:50px;
 background:#FF34B3;
 }
  .W{
 width:25px;
 height:25px;
 background:#CD00CD;
 }
 </style>
</head>
<body>
  <div class="one">
   <div class="two">
    <div class="three">
     <div class="four">
      <div class="five">
       <div class="six">
        <div class="seven">
         <div class="eight">
          <div class="nine">
           <div class="ten">
            <div class="Q">
              <div class="W"></div>
            </div>
          </div>
          </div>
         </div>
        </div>
       </div>
      </div>
     </div> 
    </div>
   </div>
  </div>
</body>
</html>

步骤挺简单 效果挺好看的

 

div 叠在一起 给上不同的颜色

标签:

原文地址:http://www.cnblogs.com/bingg/p/5406454.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!