当前位置:编程学习 > JS >>

CSS多层绝对嵌套定位的一个小演示

CSS多层绝对定位的一个小演示,多个层嵌套在一起,学习CSS布局的一个好例子。
答案:<html>
<head>
<title>CSS多层绝对定位</title>
<style>
.one
{
  height:60px;
  width:200px;
  background:#cccccc;
}
.two
{
  width:400px;
  height:60px;
  background:#999999;
}
.three
{
  width:600px;
  height:60px;
  background:#666666;
}
</style>
</head>

<body>
  <div class="three">
    <div class="two">
     <div class="one">这是元素中的内容,为朋友们奉献各类编程源码、CSS特效代码以及软件下载。</div>
     <div>固定内容1</div></div>
    <div>固定内容2</div></div>
</body>
</html>

上一个:jQuery 模块拖动,拖动层效果,可淡入淡出
下一个:多个可拉伸移动的网页DIV层,基于JavaScript

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,