DIV+CSS页面布局练习
来源:互联网 发布:李天生sqlserver 编辑:程序博客网 时间:2024/09/21 09:25
<html>
<head>
<style>
body{text-align:center;}
div.qq{width:960px;height:1500px;background:yellow;margin:0 auto;text-align:left;} //定义整个页面居中
div.llz{width:750px;height:400px;background:black;float:left;} //定义两列布局,第一列左侧浮动
div.lly{width:200px;height:400px;background:black;float:right;} //定义两列布局,第二列左侧浮动
div.slz{width:310px;height:400px;background:gray;float:left;margin-right:15px;margin-top:20px;}//定义三列布局,第一列左侧浮动
div.slc{width:310px;height:400px;background:gray;float:left;margin-right:15px;margin-top:20px;} //定义三列布局,第二列在第一列旁
div.sly{width:310px;height:400px;background:gray;float:right;margin-top:20px;}//定义三列布局,第三列右侧浮动
div.box{width:200px;height:50px;background:pink;float:left;margin-left:10px;margin-top:10px;}//定义多列布局,全部左侧浮动
</style>
</head>
<body>
<div class="qq">
<div class="llz"></div>
<div class="lly"></div>
<div class="slz"></div>
<div class="slc"></div>
<div class="sly"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
</body>
</html>
选择器起名的时候,标记的类名直接使用,标记.类名,如果标记里嵌套标记,命名选择器 标记1 标记2.类名(空格)代表对标记1里的标记2中的类名给样式
阅读全文
0 0
- DIV+CSS页面布局练习
- CSS+DIV页面布局
- div+css页面布局
- div+css页面布局
- CSS/DIV页面布局----
- DIV+CSS 页面布局
- div+css页面布局
- DIV+CSS首页布局练习
- DIV+CSS登陆页面练习
- 页面布局之CSS.DIV
- html DIV+CSS 页面布局
- DIV+CSS页面布局模版
- 使用CSS+DIV布局页面
- DIV+CSS固定页面布局
- [DIV/CSS] CSS页面布局笔记
- DIV+CSS首页布局练习 代码
- 用css+div进行页面布局
- 如何用div+css布局页面
- Fatal error: Uncaught exception 'PDOException'
- [UnityShader2]cg函数
- 并查集解决朋友圈问题
- 获取当前月份日期与上个月份日期
- win7系统自带的录像在哪里 Win7问题步骤记录器教程详解
- DIV+CSS页面布局练习
- 多线程进阶003 之 可利用的并行性案例
- 颜色空间——log空间和线性空间
- 回文链表(解题报告)
- 《C#高级编程》笔记系列第三弹
- x的平方根(二分查找实现)
- Pycharm or Intellij IDEA Cannot load settings from file workspace.xml
- Android 中3d旋转动画Rotate3dAnimation大图旋转失真的问题
- DIV+CSS首页布局练习