c
debax
PRO
Online Ide Html Code Editor
Author:
chris bax
Public:
www.codebax.com
info@codebax.com
Run
Settings
☀ Lights
Layout
Clear
HTML
reset
copy
Open Message
x
Welcome!
CSS
reset
Copy
body {font-family: tahoma;}.netmod { display: none; position: fixed; z-index: 1; padding-top: 20px; left: 0px; top: 0; width: 100%; height: 100%; overflow: auto; background-color: transparent; }.netmod-content { background-color: #960018; margin: auto; padding: 20px; border: 4px solid red; width: 300px;height: 200px; color: #fff;}.close { color: yellow; float: right; font-size: 28px; font-weight: bold;}.close:hover,.close:focus { color: #fff; text-decoration: none; cursor: pointer;}
Js
JAVASCRIPT
reset
Copy
var modal = document.getElementById("bax"); var btn = document.getElementById("mybax"); var span = document.getElementsByClassName("close")[0]; btn.onclick = function() { modal.style.display = "block"; } span.onclick = function() { modal.style.display = "none"; } window.onclick = function(event) { if (event.target == modal) { modal.style.display = "none"; } }