overflow-x:hidden;overflow-y:auto是可以的,如果将它定义在框架页面内可能是不能显示的。
你没有看到效果可能是由于设置的位置不对吧。
举个例子,比如我定义了一个左右两栏的框架页面,想让左侧的水平滚动条不显示,垂直滚动条显示,那就必须在左侧页面的内容中定义
body
{
overflow-x:hidden;
}
更详细的结构是这样的:
框架页面是frameset1.html
它包含的左侧的页面名为page1.html,右侧的页面名为page2.html,想让左侧的页面不显示横向滚动条就要在page1.html中定义body的属性,而不能再frameset1.html中定义。
============
第一次补充:
你的frameset1.html代码是不是这样???
在下面的
src="page1.html"....中去掉scrolling="yes",直接就写
src="page1.html"
name="leftFrame"
id="leftFrame"
title="leftFrame"
/>
然后再在page1.html定义overflow-x:hidden,应该可以。我这里没有问题。
==============
给你我的源代码吧,你试试看。
frameset1.html代码
html
PUBLIC
"-//W3C//DTD
XHTML
1.0
Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
xmlns="http://www.w3.org/1999/xhtml">
http-equiv="Content-Type"
content="text/html;
charset=utf-8"
/>
无标题文档
page1.html代码
html
PUBLIC
"-//W3C//DTD
XHTML
1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
xmlns="http://www.w3.org/1999/xhtml">
http-equiv="Content-Type"
content="text/html;
charset=utf-8"
/>
无标题文档width="500"
border="0"
cellpadding="0"
cellspacing="0">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
page2.html代码
html
PUBLIC
"-//W3C//DTD
XHTML
1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
xmlns="http://www.w3.org/1999/xhtml">
http-equiv="Content-Type"
content="text/html;
charset=utf-8"
/>
无标题文档sadsadsadsa
将它们放在同一个文件夹。