Created
August 11, 2011 22:07
-
-
Save kurrik/1140926 to your computer and use it in GitHub Desktop.
Renders an eyeball via CSS
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
<!DOCTYPE html> | |
<!-- Based off of the infinity symbol from http://css-tricks.com/examples/ShapesOfCSS/ --> | |
<html> | |
<head><title>CSS Eyeball</title> | |
<style> | |
#eyeball { | |
position: relative; | |
width: 140px; | |
height: 100px; | |
} | |
#eyeball:before, | |
#eyeball:after { | |
content: ""; | |
position: absolute; | |
top: 0; | |
left: 20px; | |
width: 60px; | |
height: 60px; | |
border: 20px solid red; | |
-moz-border-radius: 50px 50px 0 50px; | |
border-radius: 50px 50px 0 50px; | |
-webkit-transform: rotate(-45deg); | |
-moz-transform: rotate(-45deg); | |
-ms-transform: rotate(-45deg); | |
-o-transform: rotate(-45deg); | |
transform: rotate(-45deg); | |
} | |
#eyeball:after { | |
-moz-border-radius: 50px 50px 50px 0; | |
border-radius: 50px 50px 50px 0; | |
-webkit-transform:rotate(45deg); | |
-moz-transform:rotate(45deg); | |
-ms-transform:rotate(45deg); | |
-o-transform:rotate(45deg); | |
transform:rotate(45deg); | |
} | |
</style> | |
</head> | |
<body><div id="eyeball"></div></body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment