Last active
December 21, 2016 01:36
-
-
Save SabbaKilam/b22f50a992be4d7abce0c4d776c99939 to your computer and use it in GitHub Desktop.
Button with pseudo-classes
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
/** | |
* Button with pseudo-classes | |
*/ | |
html{ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; | |
padding: 0; | |
margin: 0; | |
} | |
body{ | |
padding: 0; | |
margin: 0; | |
} | |
#center{ | |
color: #222; | |
text-shadow: 0 0.5px 0 #ccc; | |
user-select: none; | |
border-radius: 0.5rem; | |
text-align: center; | |
font-family: cursive; | |
font-size: 3rem; | |
width: 30%; | |
height: 5rem; | |
margin: auto; | |
top:0; | |
bottom:0; | |
left: 0; | |
right: 0; | |
position: absolute; | |
background: linear-gradient(white, hsl(217, 50%, 50%)); | |
box-shadow: 10px 10px 15px black; | |
} | |
#center:hover{ | |
box-shadow: 5px 5px 10px black; | |
color: teal; | |
} | |
#center:active{ | |
background: linear-gradient(hsl(217, 50%, 50%), white); | |
color: black; | |
font-size: 2.9rem; | |
box-shadow: none; | |
box-shadow: inset 5px 5px 10px black; | |
} |
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> | |
<body> | |
<div id="center">Center</div> | |
</body> | |
</html> |
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
//alert('Hello world!'); |
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
{"view":"split-vertical","fontsize":"110","seethrough":"","prefixfree":"1","page":"result"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment