Last active
January 4, 2016 21:59
-
-
Save hkasera/8684566 to your computer and use it in GitHub Desktop.
Circlify can be used to create circular divs.
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
/* This makes the transition smooth.Add it globally. */ | |
div { | |
-webkit-transition: all 0.3s ease-in-out 0s; /* Chrome, Safari 3.1+ */ | |
-moz-transition: all 0.3s ease-in-out 0s; /* Firefox 3.5+ */ | |
-ms-transition: all 0.3s ease-in-out 0s; /* IE 9 */ | |
-o-transition: all 0.3s ease-in-out 0s; /* Opera 10.50-12.00 */ | |
transition: all 0.3s ease-in-out 0s; /* Firefox 16+, IE 10+, Opera 12.10+ */; | |
} | |
.circular { | |
position: relative; | |
width: 200px; | |
height: 200px; | |
-moz-border-radius: 50%; | |
-webkit-border-radius: 50%; | |
border-radius: 50%; | |
border-color: #000; | |
cursor: pointer; | |
display: inline-block; | |
text-align: center; | |
-webkit-box-shadow: 0 1px 6px 1px rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.4); | |
-moz-box-shadow: 0 1px 6px 1px rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.4); | |
box-shadow: 0 1px 6px 1px rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.4); | |
-webkit-transform: scale(1) perspective(200); | |
-moz-transform: scale(1) perspective(200); | |
-ms-transform: scale(1) perspective(200); | |
-o-transform: scale(1) perspective(200); | |
transform: scale(1) perspective(200); | |
} | |
.clabel { | |
font-weight: 100; | |
font-size: 30px; | |
line-height: 200px; | |
color: #10719E; | |
font-family: Century Gothic, sans-serif; | |
text-shadow: 0 0 3px rgb(160, 160, 160); | |
} | |
.circular:hover { | |
-webkit-transform: scale(1.1); | |
-moz-transform: scale(1.1); | |
-ms-transform: scale(1.1); | |
-o-transform: scale(1.1); | |
transform: scale(1.1); | |
} |
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> | |
<html> | |
<head> | |
<title>Circlify</title> | |
<link href="circlify.css" rel="stylesheet"> | |
</head> | |
<body> | |
<div class="circular"> | |
<div class="clabel">CSS</div> | |
</div> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A working demo of the above can be seen here.