Last active
December 15, 2015 16:19
-
-
Save yramagicman/5287849 to your computer and use it in GitHub Desktop.
Create guides on a webpage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
'use strict'; | |
var vGuidePos = '50%'; | |
var hGuidePos = '50%'; | |
var vguide = document.createElement('div'); | |
var hguide = document.createElement('div'); | |
var vstyle = vguide.style; | |
var hstyle = hguide.style; | |
vstyle.borderLeft = ' 1px solid red'; | |
vstyle.width = '1px'; | |
vstyle.height = '100%'; | |
vstyle.position = 'fixed'; | |
vstyle.top = '0'; | |
vstyle.zIndex = '99999999'; | |
vstyle.left = vGuidePos; | |
hstyle.borderTop = ' 1px solid red'; | |
hstyle.width = '100%'; | |
hstyle.height = '1px'; | |
hstyle.position = 'fixed'; | |
hstyle.top = hGuidePos; | |
hstyle.left = '0'; | |
hstyle.zIndex = '99999999'; | |
document.body.appendChild(vguide); | |
document.body.appendChild(hguide); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment