html - How to create a modal popup using javascript and CSS -
Basically, two questions:
- How do I create a modal popup with background color? Can gray?
- In addition to this I need to create only a cover for the background color on the table, not on the overall page.
How can I do this via javascript and CSS?
Here is the HTML that should be included with JS, and the styles should be in an external stylesheet .
& gt; Div style = "background: gray; width: 200px; height: 200 px; position: absolute; left: 50% top: 50% margin-left: -100px; margin-top: -100px" id = "modal "& Gt; I'm a modal & lt; / Div & gt; Then, you can take advantage of jQuery to display it.
$ ('a.modal'). Tie ('click', function (event) {Event.preventDefault (); $ ('# modal'). Fidine (800);}); It's just a beginning, you want to learn from it and want to build on it. For example, the script should be shown as (': hidden') , and if not then fadeOut (800) or similarity should be checked.
Comments
Post a Comment