如何定义HTML页面不允许滚动条和调整大小? [英] How to define a HTML page not allow scroll bars and resize?

查看:151
本文介绍了如何定义HTML页面不允许滚动条和调整大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何在JavaScript中执行此操作


window.open(" newFile.html",

" newTarget",

" scrollbars = no,resizable = 0,width = 200,height = 20 0");


浏览器将打开一个200x200的新窗口,而不是允许调整大小和

没有自动水平,垂直滚动条。


我很想知道我可以在HTML文件中做类似的事情,比如


< html>< head>

< meta pageSize = 200x200,resize = no,scrollbars = no />

< / head>

< body>

....

< / body>< / html>


我可以这样做吗?


或者用CSS做

html {height:200;宽度:200;

溢出-y:隐藏; overflow-x:hidden; }


但你怎么能在html标签的CSS外面?

因为< styletag位于html打开/关闭标签之间。 />

有什么想法吗?


提前非常感谢Q!

I know how to do this in JavaScript by

window.open("newFile.html",
"newTarget",
"scrollbars=no,resizable=0,width=200,height=20 0");

The browser will open a new window size 200x200, not allow resize and
no auto horizontal, vertical scrolling bars.

I am wonder can I do the similar inside a HTML file like

<html><head>
<meta pageSize=200x200, resize=no, scrollbars=no />
</head>
<body>
....
</body></html>

Can I do that?

Or do in CSS
html { height: 200; width: 200;
overflow-y: hidden; overflow-x: hidden; }

But how can you in CSS out side of the html tag?
Because the <styletag is between the html open/close tags.

Any idea?

Thank Q very much in advance!

推荐答案

RC写道:
RC wrote:

我知道如何在JavaScript中执行此操作


window.open(" newFile .html",

" newTarget",

" scrollbars = no,resizable = 0,width = 200,height = 20 0");


浏览器将打开一个200x200的新窗口,不允许调整大小和

没有自动水平,垂直滚动条。


我很想知道我可以在HTML文件中做类似的事情,例如


< html>< head>

< meta pageSize = 200x200,resize =不,滚动条=没有/>

< / head>

< body>

...

< / body>< / html>

我可以这样做吗?


或者用CSS做

html {身高:200;宽度:200;

溢出-y:隐藏; overflow-x:hidden; }


但你怎么能在html标签的CSS外面?

因为< styletag在html打开/关闭标签之间。
I know how to do this in JavaScript by

window.open("newFile.html",
"newTarget",
"scrollbars=no,resizable=0,width=200,height=20 0");

The browser will open a new window size 200x200, not allow resize and
no auto horizontal, vertical scrolling bars.

I am wonder can I do the similar inside a HTML file like

<html><head>
<meta pageSize=200x200, resize=no, scrollbars=no />
</head>
<body>
...
</body></html>

Can I do that?

Or do in CSS
html { height: 200; width: 200;
overflow-y: hidden; overflow-x: hidden; }

But how can you in CSS out side of the html tag?
Because the <styletag is between the html open/close tags.



这是用户的业务,而不是你的业务,他想要多大或需要他的

窗口。我在

网页上遇到的最令人讨厌的事情之一是突然让我的浏览器全屏打开的页面,好像网站所有者已经拥有了b
任何控制我的

电脑屏幕布局的商家。这就是播放不需要的音乐。

It''s the user''s business, not yours, how big he wants or needs his
window to be. One of the most obnoxious things I''ve come across on the
web is a page that suddenly makes my browser open full-screen, as though
the site owner has any business whatsoever controlling the layout of my
computer screen. This is right up there with playing unwanted music.


RC< ra ********** @ nospam.noaa.govwrote:
RC <ra**********@nospam.noaa.govwrote:

我知道如何在JavaScript中执行此操作


window.open(" newFile.html",

" newTarget",

" scrollbars = no,resizable = 0,width = 200,height = 20 0");


浏览器将打开一个200x200的新窗口,不允许调整大小和

没有自动水平,垂直滚动条。
I know how to do this in JavaScript by

window.open("newFile.html",
"newTarget",
"scrollbars=no,resizable=0,width=200,height=20 0");

The browser will open a new window size 200x200, not allow resize and
no auto horizontal, vertical scrolling bars.



也许。也许不吧。这取决于浏览器和浏览器设置。


我的浏览器允许我调整大小并滚动所有窗口。而window.open()

可能会也可能不会打开一个新窗口/标签,具体取决于我正在访问的网站

以及window.open的上下文使用()。


当然,在某些浏览环境中,像窗口这样的概念也是如此。或者

" pixel"可能无关紧要。

-

Darin McGrew, mc **** @ stanfordalumni .org http://www.rahul.net/mcgrew/

网页设计组, da***@htmlhelp.com http://www.HTMLHelp.com/

盒子说,需要Windows 98或更高版本。所以我安装了Linux。

Maybe. Maybe not. That depends on the browser, and on the browser settings.

My browser allows me to resize and scroll all windows. And window.open()
may or may not open a new window/tab, depending on which site I''m visiting
and the context in which window.open() is used.

And of course, in some browsing environments, concepts like "window" or
"pixel" may be irrelevant.
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

The box said, "Requires Windows 98 or better." So I installed Linux.


在2006-07-26,RC写道:
On 2006-07-26, RC wrote:

我知道如何这是在JavaScript中通过


window.open(" newFile.html",

" newTarget",

" ; scrollbars = no,resizable = 0,width = 200,height = 20 0");


浏览器将打开一个200x200的新窗口,不允许调整大小和

没有自动水平,垂直滚动条。
I know how to do this in JavaScript by

window.open("newFile.html",
"newTarget",
"scrollbars=no,resizable=0,width=200,height=20 0");

The browser will open a new window size 200x200, not allow resize and
no auto horizontal, vertical scrolling bars.



不在我的浏览器中,它不会!


如果我想在新窗口中打开页面(或新标签),*我*将

告诉我的浏览器这样做。任何粗鲁到足以尝试

的页面都告诉我我想要的东西不会走得太远。

Not in my browser, it won''t!

If I want a page to open in a new window (or a new tab), *I* will
tell my browser to do that. Any page that is rude enough to try to
tell me what I want does not get very far.


我很想知道我能做什么HTML文件中类似的内容如

< html>< head>
< meta pageSize = 200x200,resize = no,scrollbars = no />
< / head>
< body>

...
< / body>< / html>


我可以去做?
I am wonder can I do the similar inside a HTML file like

<html><head>
<meta pageSize=200x200, resize=no, scrollbars=no />
</head>
<body>
...
</body></html>

Can I do that?



天堂禁止!

Heaven forbid!


或者用CSS做

html {height :200;宽度:200;

溢出-y:隐藏; overflow-x:hidden; }


但你怎么能在html标签的CSS外面?

因为< styletag位于html打开/关闭标签之间。 />

有什么想法吗?


提前非常感谢Q!
Or do in CSS
html { height: 200; width: 200;
overflow-y: hidden; overflow-x: hidden; }

But how can you in CSS out side of the html tag?
Because the <styletag is between the html open/close tags.

Any idea?

Thank Q very much in advance!



-

Chris FA Johnson,作者< http://cfaj.freeshell.org>

Shell Scripting Recipes:问题解决方案(2005,Apress)

=====我在这篇文章中的代码(如果有的话)假设POSIX语言环境

= ====并根据GNU通用公共许可证发布


--
Chris F.A. Johnson, author <http://cfaj.freeshell.org>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence


这篇关于如何定义HTML页面不允许滚动条和调整大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆