Created
April 12, 2011 02:30
-
-
Save danbeam/914808 to your computer and use it in GitHub Desktop.
Feature detecting styles on Mozilla's homepage
This file contains hidden or 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
// 1) Go to - http://www.mozilla.com/en-US/firefox/fx/ in FF3-4, Chrome | |
// 2) Run this: | |
(function () { | |
var p = document.getElementsByTagName('p')[3]; | |
p.style.boxShadow = '5px 5px red'; | |
p.style.MozBoxShadow = '5px 5px yellow'; | |
p.style.WebkitBoxShadow = '-5px -5px blue'; | |
var c = p.cloneNode(true); | |
console.log('Original', 'box-shadow', p.style.boxShadow, '-webkit-box-shadow', p.style.WebkitBoxShadow, '-moz-box-shadow', p.style.MozBoxShadow); | |
console.log('Cloned', 'box-shadow', c.style.boxShadow, '-webkit-box-shadow', c.style.WebkitBoxShadow, '-moz-box-shadow', c.style.MozBoxShadow); | |
}()); | |
// 3) Look at the console, :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment