去除框架滚动条

问题描述 投票:0回答:5

我设计了一个带有框架的网页。这是我的作业,所以我必须使用框架。 在我的页面中有很多框架,并且内部框架有滚动条。我需要删除它,我该如何删除它?

这是我的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>

这是我的页面展望:

enter image description here

http://download.cnet.com/YouTube-To-MP3/3000-2071_4-75810474.html >youtube 到 mp3

html frame
5个回答
3
投票

只需添加到 main.html 中并与框架对齐:

scrolling="no"

所以结果是:

<frame scrolling="no" src="left.html" name="anasayfa" marginwidth="5" marginheight="5" frameborder="NO" border="0" noresize="noresize" >

这是你的 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>

2
投票

只需在对象上设置

overflow: hidden;

#objectID {
    overflow: hidden;
}

注意:

objectID
更改为您的对象 ID。

您也可以尝试:

frame{
    overflow:hidden;
}

它可能会起作用...如果你尝试的话不会有什么坏处:)

祝你好运!


0
投票

好的,您需要做的就是在每个

scrolling="no"
标签上添加:
'frame'

听起来很简单。

但是请注意:您将获得框架内项目的完整宽度(这就是为什么有滚动条)

希望我有帮助:)


0
投票

向框架添加

scrolling
属性并将值设置为
no

http://www.w3schools.com/tags/att_frame_scrolling.asp

编辑:

另一个选项是在您当前创建的框架周围添加另一个框架集。

这个问题中找到并适合您。

文件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>

文件 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>

看看这是否适合您。


0
投票
在主页写

frame::-webkit-scrollbar { display: none; } /* Hide scrollbar for IE, Edge and Firefox */ frame ,frameset { -ms-overflow-style: none; /* IE and Edge */ scrollbar-width: none; /* Firefox */ padding: 0px; margin: 0px; }
进入框架页面

body::-webkit-scrollbar { display: none; } /* Hide scrollbar for IE, Edge and Firefox */ body { -ms-overflow-style: none; /* IE and Edge */ scrollbar-width: none; /* Firefox */ padding: 0px; margin: 0px; }
    
© www.soinside.com 2019 - 2024. All rights reserved.