Html 移除框架滚动条
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14060475/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
remove frame scrolling bar
提问by user983924
I designed a web page with frames. It is my homework so I must use frames. In my page there are a lot of frames, and the inner frame has scrolling bar. I ned to remove it, how can i remove it?
我设计了一个带有框架的网页。这是我的家庭作业,所以我必须使用框架。在我的页面中有很多框架,内框架有滚动条。我要删除它,我该如何删除它?
This is my main.html code:
这是我的 main.html 代码:
<frameset frameborder="NO" framespacing="0" cols="18%,*,18%" border="0" >
<!-- Navigational Bar -->
<frame src="side.html" name="left" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize">
<!-- Interior Frame -->
<frameset frameborder="NO" framespacing="0" rows="280,*" border="0">
<frame src="header.html" name="middle" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize">
<frameset frameborder="NO" framespacing="0" cols="180,*" border="0">
<frame src="left.html" name="anasayfa" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize">
<frame src="anasayfa.html" name="mainframe" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize">
</frameset>
</frameset>
<!-- Interior Frame -->
<frame src="side.html" name="right" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize">
</frameset>
This is my page outlook:
这是我的页面展望:
http://download.cnet.com/YouTube-To-MP3/3000-2071_4-75810474.html >youtube to mp3
http://download.cnet.com/YouTube-To-MP3/3000-2071_4-75810474.html >youtube 到 mp3
回答by Eliran Efron
Just set overflow: hidden;
on the object:
只需overflow: hidden;
在对象上设置 :
#objectID {
overflow: hidden;
}
Note:Change objectID
for with your object id.
注意:更改objectID
为您的对象 ID。
You may also try:
您也可以尝试:
frame{
overflow:hidden;
}
It may work... wouldn't hurt if you try :)
它可能会起作用......如果你尝试,不会有什么伤害:)
Good luck!
祝你好运!
回答by Ignacio Correia
Just add to the main.html in lines with frames:
只需在带有框架的行中添加到 main.html 中:
scrolling="no"
so the result is:
所以结果是:
<frame scrolling="no" src="left.html" name="anasayfa" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize" >
This is your main.html result:
这是您的 main.html 结果:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="keywords" content="Webpage, design, yumakli" />
<meta name="description" content="Yumakli koyu web sayfasi" />
<style type = "text/css">
frame{
overflow:hidden;
}
</style>
</style>
<script></script>
</head>
<div style="width:5000; height:5000;">
<frameset frameborder="NO" framespacing="0" cols="18%,*,18%" border="0" >
<!-- Navigational Bar -->
<frame src="side.html" name="left" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize" scrolling="no">
<!-- Interior Frame -->
<frameset frameborder="NO" framespacing="0" rows="280,*" border="0">
<frame src="header.html" name="middle" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize" scrolling="no">
<frameset frameborder="NO" framespacing="0" cols="180,*" border="0">
<frame src="left.html" name="anasayfa" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize" scrolling="no">
<frame src="anasayfa.html" name="mainframe" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize" scrolling="no">
</frameset>
</frameset>
<!-- Interior Frame -->
<frame src="side.html" name="right" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize" scrolling="no">
</frameset>
</div>
</html>
回答by Eliran Efron
Ok so all you need to do is add: scrolling="no"
on each 'frame'
tag.
好的,您需要做的就是scrolling="no"
在每个'frame'
标签上添加:。
It is as easy as it sounds.
这听起来很简单。
But notice:you would get the full width of the items inside the frame (that's why there is a scroll bar)
但请注意:您将获得框架内项目的全宽(这就是为什么有滚动条的原因)
Hope i help :)
希望我有帮助:)
回答by vortextangent
Add a scrolling
attribute to your frame and set the value to no
.
scrolling
向您的框架添加一个属性并将值设置为no
。
http://www.w3schools.com/tags/att_frame_scrolling.asp
http://www.w3schools.com/tags/att_frame_scrolling.asp
Edit:
编辑:
Another option is to add another framesetaround the ones you have currently created.
Found in this questionand adapted to you.
在这个问题中找到并适应了你。
file index.html:
文件 index.html:
<html>
<frameset rows="1,480" frameborder="NO" border="0" noresize="noresize" scrolling="yes">
<FRAME SRC="javascript:<HTML></HTML>" NAME="dummy" FRAMEBORDER="NO" MARGINHEIGHT="0" MARGINWIDTH="0" NORESIZE SCROLLING="NO">
<FRAME SRC="main.html" NAME="scrollcontent" FRAMEBORDER="NO" MARGINHEIGHT="0" MARGINWIDTH="0" NORESIZE SCROLLING="yes">
</frameset>
</html>
file main.html
文件 main.html
<html><frameset frameborder="NO" framespacing="0" cols="18%,*,18%" border="0" >
<!-- Navigational Bar -->
<frame src="side.html" name="left" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize">
<!-- Interior Frame -->
<frameset frameborder="NO" framespacing="0" rows="280,*" border="0">
<frame src="header.html" name="middle" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize" SCROLLING="NO">
<frameset frameborder="NO" framespacing="0" cols="180,*" border="0">
<frame src="left.html" name="anasayfa" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize" SCROLLING="NO">
<frame src="anasayfa.html" name="mainframe" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize" SCROLLING="NO">
</frameset>
</frameset>
<!-- Interior Frame -->
<frame src="side.html" name="right" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize">
</frameset>
</html>
See if that works for you.
看看这是否适合你。