Skip to content

Instantly share code, notes, and snippets.

@chrisdemars
Created September 1, 2014 01:07
Show Gist options
  • Save chrisdemars/dc703fc8f2716346ceb7 to your computer and use it in GitHub Desktop.
Save chrisdemars/dc703fc8f2716346ceb7 to your computer and use it in GitHub Desktop.
A Pen by Chris DeMars.
<h1>Neat CSS3 Fun Things! HOVER TO SEE!!</h1>
<div class="box red"></div>
<div class="box blue"></div>
<div class="box yellow"></div>
<div class="box green"></div>
h1 {
font-size: 40px;
text-align: center;
margin-top: 10px;
}
.box {
width: 100px;
height: 100px;
display: inline-block;
margin-left: 50px;
margin-top: 50px;
-webkit-transition: width 2s;
transition: width 2s;
}
.red {
background-color: red;
transition-property: background;
transition-duration: 1s;
transition-timing-function: linear;
}
.red:hover {
background: darkred;
}
.blue {
background-color: blue;
border-radius: 6px;
transition-property: background, border-radius;
transition-duration: .5s;
transition-timing-function: linear;
}
.blue:hover {
background: lightblue;
border-radius: 50%;
}
.yellow {
background-color: yellow;
-webkit-transform: rotate(20deg);
-moz-transform: rotate(20deg);
-o-transform: rotate(20deg);
transform: rotate(20deg);
}
.green {
background-color: green;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment