значения свойства:
* {
margin
:
0
;
padding
}
.main {
height
600px
width
900px
position
absolute
top
50%
left
margin-top
-300px
margin-left
-450px
.wrapper {
33.3%
100%
float
#div
1
, #div
2
3
{
200px
relative
-100px
background-color
#3BA9DE
transition-property:
all
-moz-transition-property:
-o-transition-property:
-webkit-transition-property:
-ms-transition-property:
transition-duration:
s;
-moz-transition-duration:
-o-transition-duration:
-webkit-transition-duration:
-ms-transition-duration:
transition-timing-function: linear;
-moz-transition-timing-function: linear;
-o-transition-timing-function: linear;
-webkit-transition-timing-function: linear;
-ms-transition-timing-function: linear;
-moz-transition-timing-function: ease-in;
-o-transition-timing-function: ease-in;
-webkit-transition-timing-function: ease-in;
1:
hover {
250px
#A3E61D
2:
#7092BE
3:
#852E76
* { margin: 0; padding: 0; } .main { height: 600px; width: 900px; position: absolute; top: 50%; left: 50%; margin-top: -300px; margin-left: -450px; } .wrapper { width: 33.3%; height: 100%; float: left; } #div1, #div2, #div3 { height: 200px; width: 200px; float: left; position: relative; top: 50%; left: 50%; margin-top: -100px; margin-left: -100px; background-color: #3BA9DE; transition-property: all; -moz-transition-property: all; -o-transition-property: all; -webkit-transition-property: all; -ms-transition-property: all; transition-duration: 1s; -moz-transition-duration: 1s; -o-transition-duration: 1s; -webkit-transition-duration: 1s; -ms-transition-duration: 1s; } #div1 { transition-timing-function: linear; -moz-transition-timing-function: linear; -o-transition-timing-function: linear; -webkit-transition-timing-function: linear; -ms-transition-timing-function: linear; } #div2 { -moz-transition-timing-function: ease-in; -o-transition-timing-function: ease-in; -webkit-transition-timing-function: ease-in; } #div1:hover { width: 250px; height: 250px; background-color: #A3E61D; } #div2:hover { width: 250px; height: 250px; background-color: #7092BE; } #div3:hover { width: 250px; height: 250px; background-color: #852E76; }
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
link
href
"css/style.css"
rel
"stylesheet"
script
type
"text/javascript"
src
"https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"
></
</
body
div
class
"main"
"wrapper"
id
"div1"
"div2"
"div3"
/*JavaScript*/
document.getElementById("div2").style.transitionTimingFunction="ease-in";
document.getElementById("div2").style.msTransitionTimingFunction="ease-in";
/*jQuery*/
$(document).ready(function() {
$("#div3").css({ "transition-timing-function": "ease-out" });
$("#div3").css({ "-moz-transition-timing-function": "ease-out" });
$("#div3").css({ "-o-transition-timing-function": "ease-out" });
$("#div3").css({ "-webkit-transition-timing-function": "ease-out" });
$("#div3").css({ "-ms-transition-timing-function": "ease-out" });
});