Skip to content

Instantly share code, notes, and snippets.

@SabbaKilam
Last active December 21, 2016 01:36
Show Gist options
  • Save SabbaKilam/b22f50a992be4d7abce0c4d776c99939 to your computer and use it in GitHub Desktop.
Save SabbaKilam/b22f50a992be4d7abce0c4d776c99939 to your computer and use it in GitHub Desktop.
Button with pseudo-classes
/**
* 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;
}
<!doctype html>
<html>
<body>
<div id="center">Center</div>
</body>
</html>
//alert('Hello world!');
{"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