Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
Results 1 to 2 of 2
-
04-10-2016, 11:42 AM #1New Coder
- Join Date
- Jul 2015
- Posts
- 17
- Thanks
- 1
- Thanked 0 Times in 0 Posts
Link to a pure CSS modal already 'poppedup'
Hi All,
I am using a pure css template for modal popups. I would like to know how to make a link to an already 'poppedup' modal so I can share it.
Thanks
Fiddle
HTML
CSSCode:<label for="modal1">OPEN</label> <input type="checkbox" class="modal" id="modal1"> <div class="modal"> <article> <p>Modal content here!</p> </article> <label for="modal1" class="close"></label> <label for="modal1" class="overlay"></label> </div>
Code:label { color: #00f; text-decoration: underline; cursor: pointer } .modal, .modal * { box-sizing: border-box; -moz-box-size: border-box; transition: all .2s ease-in-out } .modal:checked+.modal { opacity: 1; pointer-events: all } .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 500; padding: 15px; overflow-y: scroll; opacity: 0; pointer-events: none } .modal article { background: #fff; width: 100%; padding: 50px; position: relative; z-index: 700 } .modal .close:before { content: '×'; display: block; padding: 20px 30px; font-size: 200%; position: absolute; top: 0; right: 0; z-index: 800; cursor: pointer } .modal .close:hover:before { color: #c00 } .modal .overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, .5); z-index: 600; cursor: pointer }
-
04-10-2016, 07:33 PM #2Senior Coder
- Join Date
- Aug 2010
- Posts
- 1,103
- Thanks
- 30
- Thanked 241 Times in 239 Posts
Link to a page with
this modification ...
<input type="checkbox" class="modal" id="modal1" checked>Cleverness is serviceable for
everything,
sufficient in nothing.



Reply With Quote
