开发者

Difference in using Visiblity and Style of a div tag

What is the difference below?

<div id="div1" runat="server" visible="false">Hello</div>

In contrast, I can do this

&l开发者_如何学JAVAt;div id="div1" style="display:none;">Hello</div>


with the first, the div will not be rendered to page.

with the second (display:none;), it will be rendered to the page, but not visible.

You can see this by viewing the source of the rendered page for each example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜