我想要两个框架,它们之间没有空间.这是我的测试用例:
<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>
Run Code Online (Sandbox Code Playgroud)
red.html只是:
<html><body bgcolor="red"></body></html>
Run Code Online (Sandbox Code Playgroud)
然而,当我渲染它时,我在两帧之间得到一条白线.我怎么让它消失?
jga*_*ant 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>
Run Code Online (Sandbox Code Playgroud)
这将解决您的问题.
Mar*_*ark -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>
Run Code Online (Sandbox Code Playgroud)