Skip to content

Instantly share code, notes, and snippets.

@loai-kanou
Forked from LeaVerou/dabblet.css
Created August 5, 2013 03:47
Show Gist options
  • Save loai-kanou/6153362 to your computer and use it in GitHub Desktop.
Save loai-kanou/6153362 to your computer and use it in GitHub Desktop.
border-radius computed style test
/**
* border-radius computed style test
*/
div {
width: 200px;
height: 100px;
padding: 2.4em 0;
box-sizing: border-box;
background: deeppink;
color: white;
text-shadow: 0 -1px 2px rgba(0,0,0,.3);
text-align: center;
font-family: Consolas, Monaco, monospace;
}
div:before {
content: attr(style);
}
<div style="border-radius: 300px"></div>
<div style="border-radius: 99em"></div>
<div style="border-radius: 100%"></div>
var divs = document.getElementsByTagName('div');
for (var i=0; i<divs.length; i++) {
divs[i].onclick = function(){
alert(getComputedStyle(this).borderTopRightRadius);
}
}
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"javascript"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment