Skip to content

Instantly share code, notes, and snippets.

@erickeno
Forked from anonymous/index.html
Created April 19, 2013 23:25
Show Gist options
  • Save erickeno/5423935 to your computer and use it in GitHub Desktop.
Save erickeno/5423935 to your computer and use it in GitHub Desktop.
transition with cubic-bezier property
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/page.css">
<title>CSS3</title>
</head>
<body>
<div id="wrapper">
<div id="myDiv1" class="mydiv"></div>
</body>
</html>
body {
background: #EEE;
font-family: arial, helvetica, sans-serif;
margin: 0;
padding: 0;
}
#wrapper {
width: 960px;
margin: 0 auto;
}
.mydiv {
margin: 60px auto;
width: 400px;
height: 400px;
background-color: #ff9900;
}
#myDiv1 {
transition: all 1s cubic-bezier(1.0,0,1.0,0);
}
#myDiv1:hover {
background: #0099FF;
box-shadow: 0px 0px 30px #000;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment