我想要两个没有空格的框架。这是我的测试用例:
<html>
<frameset framespacing="0" rows="50%, 50%">
<frame frameborder="0" src="red.html" scrolling="no" noresize="1" />
<frame frameborder="0" src="red.html" />
</frameset>
</html>
red.html只是:
<html><body bgcolor="red"></body></html>
然而,当我渲染它时,我在两帧之间得到一条白线。我如何让它消失?
答案 0 :(得分:10)
您需要在Frameset标记中指定FrameBorder属性。 因此,您的主页将如下所示:
<html>
<frameset framespacing="0" rows="50%, 50%" frameborder="0">
<frame frameborder="0" src="red.html" scrolling="no" noresize="1" />
<frame frameborder="0" src="red.html" />
</frameset>
</html>
这将解决您的问题。
答案 1 :(得分:1)
<html>
<frameset framespacing="0" rows="50%, 50%" framespacing="0" frameborder=no>
<frame frameborder="0" src="red.html" scrolling="no" noresize="1" />
<frame frameborder="0" src="red.html" />
</frameset>
</html>
frameborder = no非常重要。
答案 2 :(得分:1)
始终首选使用css样式而不是frameborder属性。
<frameset cols="50%,50%">
<frame src="frame_1.htm" style="border:none">
<frame src="frame_2.htm">
</frameset>
最好尽可能使用iframe和div。
HTML5不支持进一步的框架集。
答案 3 :(得分:0)
将border = 0添加到frameset标记。
答案 4 :(得分:-1)
以下是我过去使用的没有白线的工作代码示例。
<frameset rows="10%,*" noresize framespacing=0 frameborder=no border=0 >
<frameset cols="140,*" noresize framespacing=0 frameborder=no border=0 >
<frame name="globe" scrolling="no" src="./GIF/globe.jpg" marginwidth="0 marginheight="0">
<frame name="logo" src="logo.htm" scrolling="no" >
</frameset>
<frameset cols="160,*" noresize framespacing=0 frameborder=no border=0 >
<frame name="userselections" src="userselections.php" scrolling="auto">
<frame name="results" src="nothing.htm" scrolling="auto">
</frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>