A Pen by Chris DeMars on CodePen.
Created
September 1, 2014 01:07
-
-
Save chrisdemars/dc703fc8f2716346ceb7 to your computer and use it in GitHub Desktop.
A Pen by Chris DeMars.
This file contains hidden or 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
<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> | |
This file contains hidden or 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
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