开发者

ASP.NET C# Javascript div Centering

开发者 https://www.devze.com 2022-12-21 23:55 出处:网络
I want to, when the user clicks a button on my website, to make a DIV appear in the center of the browser above all other content on the website. I have created the DIV and even have the visible/hidde

I want to, when the user clicks a button on my website, to make a DIV appear in the center of the browser above all other content on the website. I have created the DIV and even have the visible/hidden thingy开发者_运维技巧 figured out. The overlaying and the centering parts are what I am unable to understand.


You're talking about a shadowbox/modal window. Microsoft provides an example of this in their AJAX control toolkit if you want to stay strictly C#. This can also be done easily with third party API's, using jQuery, such as ShadowBox.js or DOM Window

The works done for you. You just need to plug it in.

0

精彩评论

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

关注公众号