Css Div浮动叠加层效果
2009-09-08 13:27
323 查看
效果图:
源代码:
源代码:
<!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>Css Div浮动叠加层效果</title> <style type="text/css"> body { margin : 0; padding : 0; font-size:12px; } #wrap { position : relative; width : 900px; margin : 30px auto; background : #ddd; } #header { float : left; width : 900px; height : 150px; background : url(banner.jpg) no-repeat 50% 10px; } #main { float : left; width : 590px; height : 380px; margin : 10px 0 20px 10px; border : 1px solid #999; background : #fff; } #sider { float : right; position : absolute; width : 260px; height : 560px; top : -20px; right : 18px; border : 2px solid #03c; background-color: #F2F2F2; } .clear { clear : both; } </style> </head> <body> <div id="wrap"> <div id="header">头部层 <a href="#">头部层</a></div> <div id="main">主题层<br /><a href="#">头部层</a></div> <div id="sider">叠加层<br /><a href="#">头部层</a></div> <div class="clear"></div> </div> </body> </html>
相关文章推荐
- Css Div浮动叠加层效果
- (转)css中通常会用到浮动与清除,也是一个必须掌握的知识点,概念性的东西不多说,下面举几个例子,来说明它的用法:1.文字环绕效果 2.多个div并排显示 3.清除浮动(默认显示)
- div+css布局控制div定位浮动层在背景图片上的半透明阴影效果
- 最简单的Div+ CSS弹出层效果
- css实际技巧---父div中有浮动的子div,父容器不能自适应高度,清除浮动,父容器自适应高度
- 纯div+css实现手风琴效果下拉框的两种方法
- div+css顶部固定浮动
- 效果直逼flash的Div+Css+Js菜单
- DIV浮动效果
- 一个DIV+CSS导航条效果
- 神奇!js+CSS+DIV实现文字颜色渐变效果
- [DIV/CSS] CSS-清除浮动
- DIV 清除浮动--CSS 伪元素-- 阴影---鼠标事件
- DIV实现CSS 的placeholder效果
- css实现圣杯布局(两栏固定-中列浮动-中列div排在前面)--详解
- DIV+CSS圆角效果的简易实现
- DIV重叠 CSS让DIV层叠 两个DIV或多个DIV顺序重叠加
- CSS实现DIV感应鼠标Hover时的显示隐藏效果
- C#实现winform仿div+css半透明遮罩效果
- 纯CSS DIV 圆角效果