Skip to content

Instantly share code, notes, and snippets.

@SabbaKilam
Last active December 16, 2016 02:56
Show Gist options
  • Save SabbaKilam/34571476b3e4dcded0a214dfb2120ba8 to your computer and use it in GitHub Desktop.
Save SabbaKilam/34571476b3e4dcded0a214dfb2120ba8 to your computer and use it in GitHub Desktop.
Transitions, Flips and Colors
/**
* Transitions, Flips and Colors
*/
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;
transition: all 2s ease;
}
#center:hover{
box-shadow: 5px 5px 10px black;
color: teal;
transform: rotateX(180deg);
}
#center:active{
background: linear-gradient(hsl(217, 50%, 50%), white);
color: black;
font-size: 2.95rem;
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":"separate","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment