JavaScript中的可见性 [英] Visibility In JavaScript

查看:138
本文介绍了JavaScript中的可见性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai Frnds ...

Java脚本中的可见性和隐藏属性是什么..... ???

Hai Frnds...

What is the visibility and Hidden Property in Java Script.....???

推荐答案

指定或返回该元素是否可见 .

如果要隐藏或显示元素的内容,此属性很有用.

display属性类似,但
如果将可见性属性设置为''hidden'',则仅元素的内容将不可见,元素将保持其原始位置和大小.

值为"none"的显示属性将隐藏整个元素.

请看以下显示可见性属性的用法的示例:
Specifies or returns whether the element is visible.

This property is useful if you want to hide or show the contents of an element.

Similar to display property, but
if you set the visibility property to ''hidden'', only the contents of the element will be invisible, the element stays in its original position and size.

The display property with value ''none'' hides the entire element.

Have a look on following example which shows the use of the visibility property:
<head>
    <style>
        .visible {
            visibility: visible;
        }
        .hidden {
            visibility: hidden;
        }
    </style>
</head>
<body>
    <div class="hidden">A hidden element</div>
    <div class="visible">A visible element</div>
    There is an invisible element at the first line of the page
</body>


找到它:此处 [ javascript教程 [ ^ ]
面向Javascript开发者的快速链接 [


Found it: here[^]

Look at these JavaScript tutorials:
javascript tutorial[^]
Quick Links for Javascript Developers[^], for more details.


^ ]
http://msdn.microsoft.com/en-us/库/ie/ms531180%28v=vs.85%29.aspx [ http://help.dottoro.com/ljcwxwfw.php [
http://www.javascriptkit.com/javatutors/dom3.shtml[^]
http://msdn.microsoft.com/en-us/library/ie/ms531180%28v=vs.85%29.aspx[^]
http://help.dottoro.com/ljcwxwfw.php[^]


这篇关于JavaScript中的可见性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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