三栏自适应宽度
在书上看的。
左右栏为定宽200px;中间栏自适应,非常棒的方法,很少看到了对吗?顺便解释下height:100%;一般情况下width:100%是有效的,可 是height:100%却看不到明显作用,是因为这个百分比都是相对父级而言的,而html的定义并没有给html标签和body标签高度,默认是没有 高度的,所以height:100%,当然无效,而现在我给了html和body高度height:100%;这样我的背景色就满屏了,缺陷是,仅仅当前 一屏,再往下就不行了,css真的很好玩,晚上回去继续看书。嘿嘿。
<!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=utf-8″ />
<title>无标题文档</title>
<style type=”text/css”>
*{padding:0; margin:0;}
html,body{height:100%;}
#left{height:100%; position:absolute; left:0; top:0; width:200px; background-color:#999999;}
#right{height:100%; position:absolute; right:0; top:0; width:200px; background-color:#666666;}
#center{height:100%;background-color:#ff0; margin:0 200px;}
</style>
</head>
<body>
<div id=”left”>left</div>
<div id=”center”>center</div>
<div id=”right”>right</div>
</body>
</html>
我也在试着自己写div+css
可是还没啥感觉
感觉自己对程序代码一点兴趣都没有
雯雯也玩技术
div+css有空也买本看看,呵
我主题就是三栏的,喜欢这样的
我也要好好学css.
链接表出现两次
感觉 这个贼简单!~
Good day, Fantastic site, where did you occur up on the info in this summation? Im glad I found it though, I am going to be checking back soon to determine what other content articles you have.