标题:下面红色加粗部分不明白 能请教一下大家吗?
只看楼主
doraxwj
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2007-12-3
 问题点数:0 回复次数:2 
下面红色加粗部分不明白 能请教一下大家吗?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"[url=http://www.]http://www.[/url]">
<html>
<head>
<title>Layout 7</title>
<meta http-equiv="content-type" c>
<meta name="generator" c>
<style type="text/css">
html,body{margin:0;padding:0}
body{font: 76% arial,sans-serif;text-align:center}
p{margin:0 10px 10px}
a{display:block;color: #981793;padding:10px}
div#header h1{height:80px;line-height:80px;margin:0;
  padding-left:10px;background: #EEE;color: #79B30B}
div#container{text-align:left;width:700px;margin:0 auto}
div#content p{line-height:1.4}
div#navigation{background:#B9CAFF;float:left;width:150px;[bold]margin-left:-700px[/bold]}
div#extra{background:#FF8539;float:left;width:150px;[bold]margin-left:-150px[/bold]}
div#footer{background: #333;color: #FFF}
div#footer p{margin:0;padding:5px 10px}
div#wrapper{float:left;width:100%}
div#content{margin: 0 150px}
div#footer{clear:left;width:100%}
</style>
</head>
<body>
<div id="container">
<div id="header"><h1>Header</h1></div>
<div id="wrapper">
<div id="content">
<p><strong>1) Content here.</strong> column long long column very long fill
fill fill long text text column text silly very make long very fill silly
make make long make text fill very long text column silly silly very column
long very column filler fill long make filler long silly very long silly
silly silly long filler make column filler make silly long long fill
very.</p>
<p>very make make fill silly long long filler column long make silly silly
column filler fill fill very filler text fill filler column make fill make
text very make make very fill fill long make very filler column very long
very filler silly very make filler silly make make column column </p>
<p>fill long make long text very make long fill column make text very silly
column filler silly text fill text filler filler filler make make make make
text filler fill column filler make silly make text text fill make very
filler column very </p>
<p>column text long column make silly long text filler silly very very very
long filler fill very fill silly very make make filler text filler text make
silly text text long fill fill make text fill long text very silly long long
filler filler fill silly long make column make silly long column long make
very </p>
</div>
</div>
<div id="navigation">
<p><strong>2) Navigation here.</strong> long long fill filler very fill
column column silly filler very filler fill fill filler text fill very silly
fill text filler silly silly filler fill very make fill column text column
very very column fill fill very silly column silly silly fill fill long
filler </p>
</div>
<div id="extra">
<p><strong>3) More stuff here.</strong> column long make silly silly filler
silly very very very long column filler fill make column make silly column
fill silly column long make silly filler column filler silly long long
column fill silly column very </p>
</div>
<div id="footer"><p>Here it goes the footer</p></div>
</div>
</body>
</html>



以上是一段代码
红色部分不太明白,-700px是怎么回事情,是基准于哪条线的-700px.
float是用来定义div块的位置的吗?

[[italic] 本帖最后由 doraxwj 于 2007-12-3 15:28 编辑 [/italic]]
2007-12-03 15:24
lmhllr
Rank: 8Rank: 8
等 级:贵宾
威 望:44
帖 子:1504
专家分:42
注 册:2005-5-12
得分:0 
当margin设为负数时,块会向相反的方向移动,甚至覆盖另外的块
2007-12-03 15:36
doraxwj
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2007-12-3
得分:0 
回复 2# 的帖子
那是以块所在的位置移动还是有个页边作为标准呢?
2007-12-03 15:46



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-190078-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.384373 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved