论坛: 网站建设 标题: 为什么网页的周围会有空白? 复制本贴地址    
作者: ysfilone [ysfilone]    论坛用户   登录
我用<table></table>做了个高800,宽600的表格,把一幅图片分成6份做成背景

为什么在表格的上面还有其她边会有空白?

谢谢


地主 发表时间: 04-03-18 12:45

回复: id18953560 [id18953560]   论坛用户   登录
具体能不能发个例子?

我估计的情况是:你的代码中还有一段 &nbsp;  ,你删了看看~

B1层 发表时间: 04-03-18 15:38

回复: laoqiang [laoqiang]   论坛用户   登录
和我碰到的情况一样。我到现在也没搞懂是怎么回事。

B2层 发表时间: 04-03-18 16:14

回复: haowei111 [haowei111]   论坛用户   登录
顶你  同样问题
搞不懂 
我是加了个大背景  凑合着看吧

B3层 发表时间: 04-03-19 10:03

回复: Idof [idof]   论坛用户   登录
用切片多简单
也不会出现你说的那种情况

B4层 发表时间: 04-03-19 10:49

回复: ysfilone [ysfilone]   论坛用户   登录
用大图片作背景的话 如果人家网速慢的话 那将会是非常痛苦的事情


代码:

<html>
<head>
<title>garden</title>
</head>

<body bgcolor=purple>
<bgsound src="\music\xry-3.mid" loop="infinite">
<table border=0 cellpadding=0 cellspacing=0 width=800 height=600 >
<tr>
<td width=800 height=100 background="\picture\a1.jpg"></td>
</tr>
<tr>
<td width=800 height=100
background="\picture\a2.jpg"></td>
</tr>
<tr>
<td width=800 height=100 background="\picture\a3.jpg"></td>
</tr>
<tr>
<td width=800 height=100 background="\picture\a4.jpg"></td>
</tr>
<tr>
<td width=800 height=100 background="\picture\a5.jpg"></td>
</tr>
<tr>
<td width=800 height=100 background="\picture\a6.jpg"></td>
</tr>
</table>

</body>
</html>


代码如上  为什么会有空白呢  还望高人指点


[此贴被 远山之城(ysfilone) 在 03月19日12时51分 编辑过]

B5层 发表时间: 04-03-19 12:35

回复: xu [xu]   论坛用户   登录
网页属性
看看有没有边距

B6层 发表时间: 04-03-19 14:08

回复: ysfilone [ysfilone]   论坛用户   登录
好像没有吧

B7层 发表时间: 04-03-19 15:58

回复: wlbyyh [wlbyyh]   论坛用户   登录
<style>
<!--
margin-top: 0px;
-->
</style>
如果是表格以外的上面有空白的话,把这句加入就OK啦。如果还不可以请讲明白一点
或者联系我QQ 50938445

B8层 发表时间: 04-03-20 09:10

回复: ysfilone [ysfilone]   论坛用户   登录
谢谢 楼上的  ~!!!!

B9层 发表时间: 04-03-20 16:55

回复: laoqiang [laoqiang]   论坛用户   登录
在body里加,topmargin="0" leftmargin="0"就ok了.

B10层 发表时间: 04-03-22 08:39

回复: winlogin [winlogin]   论坛用户   登录
同意楼上的表达。

B11层 发表时间: 04-03-22 12:30

回复: ysfilone [ysfilone]   论坛用户   登录
恩 我试过了 可以的 谢谢了

B12层 发表时间: 04-03-22 12:49

论坛: 网站建设

20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon

粤ICP备05087286号