TUF8编码网页头部10像素空白如何解决? TUF8编码网页头部10像素空白如何解决?用UE编辑器去掉UTF8的bom也不行头部还是 有10像素的空白!高了2天了 苦闷!神啊,救救我吧! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你这个文件要以UTF-8 无BOM 格式编码保存。 我是以UTF-8 无BOM 格式编码保存,问题是网页上那段空白还在 ,我晕了!。 是UTF-8不是UTF8也不是TUF8!(1)查看源文件发现头部有一大段空白,那一定是你前面已经有输出了(2)查看源文件,发现头部没有空白,但是网页上预览到的有空白,是样式问题。margin:0 <!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><link rel="stylesheet" href="/style/reset.css?ver=1" /><link rel="stylesheet" href="/style/all.css?ver=1.0.1" /><link rel="stylesheet" href="/style/jquery.treeview.css" /><link rel="stylesheet" href="/style/innerpage.css?ver=1" /><link rel="stylesheet" href="/style/extend.css?ver=1" /><script type="text/ecmascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script><script type="text/ecmascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script><script type="text/ecmascript" src="/includes/js/extend-prototype.js"></script><script type="text/ecmascript" src="/includes/js/stage.js?ver=1"></script></head><body> <div id="outer_wrapper"> <div id="header"> <div id="web_top"> </div> <div id="web_logo"> <img src="/resources/images/web_logo.jpg" /> </div> <div id="top_ban"> <img src="/resources/images/top_banner.jpg" alt="" /> </div> <div id="top_nav"> <b class="left_orna"></b> <b class="right_orna"></b> <ul class="nav"> <li class="first"><a href="/"></a></li> <li><a href="#"></a></li> <li><a href="#"></a></li> </ul> <script type="text/ecmascript">/*<![CDATA[*/setTimeout(setCurrent,100)/*]]>*/</script> </div> </div> <div id="content"> <div id="top_slider"> <div id="slide_placeholder" style="height: 200px"></div> <script type="text/ecmascript">/*<![CDATA[*/swfobject.embedSWF("/resources/animations/slide.swf", "slide_placeholder", "960", "200", "10.0.0", null, {config: '6|0xFFFFFF|0x1102da|0xFFFFFF|0x62c3fa|0x3e62ff', bcastr_flie: '/resources/images/slide/1.jpg|/resources/images/slide/2.jpg|/resources/images/slide/3.jpg|/resources/images/slide/4.jpg', bcastr_link: '/content/pressroom/School.asp|/content/pressroom/article.asp?id=1059|/content/profession/highereducation.asp', bcastr_title: ''}, {wmode: 'opaque'}, null);/*]]>*/</script> </div> </div></div></body></html> <body STYLE="margin:0;"> CSS样式里有写 <body STYLE="margin:0;"> <body style="margin:0;padding:0;width:100%"> 我一直都在用utf-8做東西,怎麼沒出現你所說的問題呢文件要保存成utf8另外head頭也要加utf8才行至於你所說的10px空白,這應該是css控制的問題吧如果是css你就加margin:0;padding:0; 空白跟编码格式没关系 如果你觉得是该问题 都转成字符编码看看 应该还是有空白的!检查一下你的样式 body不建议设置属性 默认就行了 问题应该不在这里 即使你加上了margin也没用 margin适用于盒子模型的 body以为好像应该没有盒子模型了 白话就是网页的最外框就是body 除非你再body外再加一个框子(div)这样你的body才能用margin 不过具体你的问题我还没看清 个人感觉你的问题方向错了以上纯属个人感觉 我也是新人 如果有对之处 请指出 共勉之! <!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=gb2312" /><title>无标题文档</title></head><body><div style=" height:200px; border:1px #FF0000 solid">fdddd </div></body></html>奇怪 在DW里新建一个 就这么一个纯HTML的居然还自动换行个10像素的空白! 看了 单页面可以 单UTF-8可以 用PHP引入就有了 我服了! 你怎么做的php引入?直接打开php文件? 看来是新手,你要设置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=gb2312" /><title>无标题文档</title><style>body{margin:0px; padding:0px; font-size:12px;}</style></head><body><div style=" height:200px; border:1px #FF0000 solid">fdddd </div></body></html> 另外PS一下,好像没有见过什么TUF8编码,也没有UTF8编码,只有 utf-8 编码。南方学院 重建文件utf-8格式,,,复制代码,,保存。 Reset CSShttp://meyerweb.com/eric/tools/css/reset/ PHP引用问题 关于页面跳转的问题 关闭窗口的一个小问题 在php开发的WEB中,有关checkbox 多个选项中的问题? 值得讨论一下 PHP过滤html PHP 访问MYSQL 特殊字符怎么处理 用php怎样模拟aspx表单,才能让其分页,比如这个页面:http://book.taojin.com/result_book.aspx?rackcode=A01B01 图片存入数据库的问题!请各位高手帮忙看一看。 走过路过的都帮看看了, 用过Imagick的不点进来就亏了哈 关于DIRECTORY_SEPARATOR的问题 对wordpress熟悉的高手进 日期转换问题
(1)查看源文件发现头部有一大段空白,那一定是你前面已经有输出了
(2)查看源文件,发现头部没有空白,但是网页上预览到的有空白,是样式问题。margin:0
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title><link rel="stylesheet" href="/style/reset.css?ver=1" />
<link rel="stylesheet" href="/style/all.css?ver=1.0.1" />
<link rel="stylesheet" href="/style/jquery.treeview.css" />
<link rel="stylesheet" href="/style/innerpage.css?ver=1" />
<link rel="stylesheet" href="/style/extend.css?ver=1" />
<script type="text/ecmascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/ecmascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script><script type="text/ecmascript" src="/includes/js/extend-prototype.js"></script>
<script type="text/ecmascript" src="/includes/js/stage.js?ver=1"></script></head><body>
<div id="outer_wrapper">
<div id="header">
<div id="web_top">
</div>
<div id="web_logo"> <img src="/resources/images/web_logo.jpg" />
</div>
<div id="top_ban">
<img src="/resources/images/top_banner.jpg" alt="" />
</div>
<div id="top_nav">
<b class="left_orna"></b>
<b class="right_orna"></b>
<ul class="nav"> <li class="first"><a href="/"></a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
</ul>
<script type="text/ecmascript">/*<![CDATA[*/setTimeout(setCurrent,100)/*]]>*/</script>
</div>
</div>
<div id="content"> <div id="top_slider">
<div id="slide_placeholder" style="height: 200px"></div>
<script type="text/ecmascript">/*<![CDATA[*/swfobject.embedSWF("/resources/animations/slide.swf", "slide_placeholder", "960", "200", "10.0.0", null, {config: '6|0xFFFFFF|0x1102da|0xFFFFFF|0x62c3fa|0x3e62ff', bcastr_flie: '/resources/images/slide/1.jpg|/resources/images/slide/2.jpg|/resources/images/slide/3.jpg|/resources/images/slide/4.jpg', bcastr_link: '/content/pressroom/School.asp|/content/pressroom/article.asp?id=1059|/content/profession/highereducation.asp', bcastr_title: ''}, {wmode: 'opaque'}, null);/*]]>*/</script>
</div>
</div>
</div>
</body>
</html>
<body style="margin:0;padding:0;width:100%">
文件要保存成utf8
另外head頭也要加utf8才行
至於你所說的10px空白,這應該是css控制的問題吧
如果是css你就加margin:0;padding:0;
检查一下你的样式 body不建议设置属性 默认就行了 问题应该不在这里 即使你加上了margin也没用 margin适用于盒子模型的 body以为好像应该没有盒子模型了 白话就是网页的最外框就是body 除非你再body外再加一个框子(div)这样你的body才能用margin
不过具体你的问题我还没看清 个人感觉你的问题方向错了
以上纯属个人感觉 我也是新人 如果有对之处 请指出 共勉之!
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<div style=" height:200px; border:1px #FF0000 solid">
fdddd
</div>
</body>
</html>
奇怪 在DW里新建一个 就这么一个纯HTML的居然还自动换行个10像素的空白!
<!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=gb2312" />
<title>无标题文档</title>
<style>
body{margin:0px; padding:0px; font-size:12px;}
</style>
</head><body>
<div style=" height:200px; border:1px #FF0000 solid">
fdddd
</div>
</body>
</html>