默认隐藏div [英] Hiding a div by default
本文介绍了默认隐藏div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个div,仅当用户单击显示按钮时才显示
I have a div that should be shown only when the user clicks the show button
$("div.toshow").show();
我写在身上
<body>
<div class="toshow">
</div>
</body>
因此,默认情况下,在显示页面时,用户可以看到所有这些内容.有没有一种方法可以默认隐藏它?
so by default when the page is displayed all this content is seen the user. Is there a way that I can hide it bydefault?
推荐答案
是的,您可以像这样使用style
:
Yes you can can use style
like this:
<div class="toshow" style="display:none"></div>
这篇关于默认隐藏div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文