Line 13: | Line 13: | ||
margin:0 auto; | margin:0 auto; | ||
} | } | ||
− | + | ||
− | + | #box-shadow-div{ | |
− | + | position: fixed; | |
− | + | width: 1px; | |
− | + | height: 1px; | |
− | + | border-radius: 100%; | |
− | + | background-color:black; | |
− | + | box-shadow: 0 0 10px 10px black; | |
− | + | top: 49%; | |
− | + | left: 48.85%; | |
− | + | } | |
− | <script type="text/javascript"> | + | </style> |
+ | |||
+ | <script type="text/javascript"> | ||
window.onload = function(){ | window.onload = function(){ | ||
var bsDiv = document.getElementById("box-shadow-div"); | var bsDiv = document.getElementById("box-shadow-div"); | ||
Line 33: | Line 35: | ||
y = event.clientY; | y = event.clientY; | ||
if ( typeof x !== 'undefined' ){ | if ( typeof x !== 'undefined' ){ | ||
− | bsDiv.style.left = x-20 + "px"; | + | bsDiv.style.left = (x-20) + "px"; |
− | bsDiv.style.top = y-20 + "px"; | + | bsDiv.style.top = (y-20) + "px"; |
} | } | ||
}, false); | }, false); | ||
} | } | ||
</script> | </script> | ||
− | + | </head> | |
− | + | ||
+ | <body> | ||
<div style = "width:1000px; height:1000px;"> | <div style = "width:1000px; height:1000px;"> | ||
<div id="box-shadow-div"></div> | <div id="box-shadow-div"></div> | ||
</div> | </div> | ||
− | + | </body> | |
</html> | </html> |
Revision as of 19:50, 4 August 2016