DIV+CSS练习1
来源:互联网 发布:双色球系统分析软件 编辑:程序博客网 时间:2024/05/21 21:38
2.表格<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
<!--
*{padding:0;margin:0;}
#center,#left,#right{
float:left;
width:100%;
height: 500px;
background-color:#71c9b0;
}
#body{
margin: 0 200px 0 500px;
}
#left{
margin-left: -100%;
width:500px;
background-color:#f7ca8a;
}
#right{
margin-left: -200px;
width:200px;
background-color:#f5917a;
}
-->
</style>
</head>
<body>
<div id="center">
<div id="body">
自适
</div>
</div>
<div id="left">
500px
</div>
<div id="right">
200px
</div>
</body>
</html>
3.浮动<!doctype html>
<html>
<head>
<meta charset="utf-8"3>
<title>table</title>
<style type="text/css">
<!--
table{
border-collapse: collapse;
}
body{
margin: 0px;
}
.left{
width:150px;
height: 500px;
float:left;
background-color:#f7ca8a;
margin: 0px;
}
.center {
height: 500px;
width: 100%;
background-color:#71c9b0;
margin: 0px;
}
.right {
float: right;
width: 200px;
height: 500px;
background-color:#f5917a;
margin: 0px;
}
-->
</style>
</head>
<body>
<table border="1">
<tr>
<td class="left">150px</td>
<td class="center">自适</td>
<td class="right">200px</td>
</tr>
</table>
</body>
</html>
4.绝对定位<!doctype html>
<html>
<head>
<meta charset="utf-8"3>
<title>浮动</title>
<style type="text/css">
#left{
width:150px;
height: 500px;
float:left;
background-color:#f7ca8a;
margin: 0px;
}
#center {
height: 500px;
background-color:#71c9b0;
margin: 0px 200px 0px 150px;
}
#right {
float: right;
width: 200px;
height: 500px;
background-color:#f5917a;
margin: 0px;
}
body{
margin: 0px;
}
</style>
</head>
<body>
<div id="left">150px</div>
<div id="right">200px</div>
<div id="center">自适</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8"3>
<title>绝对定位</title>
<style type="text/css">
body{
margin: 0;
}
#left,#right{
position: absolute;
height: 500px;
top:0px;
}
#left{
left: 0px;
width:150px;
background-color:#f7ca8a;
}
#center {
height: 500px;
background-color:#71c9b0;
margin: 0px 200px 0px 150px;
}
#right {
right: 0px;
width: 200px;
background-color:#f5917a;
}
</style>
</head>
<body>
<div id="left">150px</div>
<div id="center">自适</div>
<div id="right">200px</div>
</body>
</html>
- div css 练习1
- DIV+CSS练习1
- div css 练习2
- DIV+CSS练习2
- DIV+CSS练习3
- div、css入门练习
- DIV+CSS登陆页面练习
- DIV+CSS页面布局练习
- DIV+CSS首页布局练习
- 【DIV+CSS】代码作业练习DIV+CSS太极阴阳图
- Div Css练习 山科主页面
- 2015-09-11 DIV CSS练习
- DIV+CSS首页布局练习 代码
- 体验DIV+CSS(1):DIV + CSS 入门
- DIV+CSS练习,DIV+CSS布局,CSS虑镜颜色渐变
- div+css (1)
- div+css学习1
- 初学CSS+DIV(1)
- hiberante dynameic-update dynamic-insert 解决每次update所有字段的问题
- Xcode5中ios7模拟器出现 Cannot find executable for CFBundle ... axbundle> (not loaded) 的解决办法
- CSS测验
- HTML测验
- CSS垂直居中水平居中方法
- DIV+CSS练习1
- DIV+CSS练习2
- Block and Inline
- CSS鼠标样式
- DIV+CSS练习3
- 14.05.20水一下
- STRUTS1.X的国际化
- PHP中的 extends与implements 区别
- glm