CSS - właściwości animation-timing-function


animation-timing-function: linear

kod wynik kodu
<!DOCTYPE html>
<html>
<head>
<title>programowanie - CSS</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<meta http-equiv="Content-Language" content="pl">
<link rel="Stylesheet" type="text/css" href="style.css" />
<style type="text/css">
.box {
  width: 200px;
  height: 93px;
  margin: 50px;
  background: url("grafika/auto.jpg") no-repeat;
  position: relative;
  animation-name: moveit;
  animation-duration: 10s;
  animation-timing-function: linear;
}
@keyframes moveit {
  from {left: 0%;}
  to {left: 60%;}
}
</style>
</head>
<body>

<div class="box"></div>

</body>
</html>


animation-timing-function: ease

kod wynik kodu
<!DOCTYPE html>
<html>
<head>
<title>programowanie - CSS</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<meta http-equiv="Content-Language" content="pl">
<link rel="Stylesheet" type="text/css" href="style.css" />
<style type="text/css">
.box {
  width: 200px;
  height: 93px;
  margin: 50px;
  background: url("grafika/auto.jpg") no-repeat;
  position: relative;
  animation-name: moveit;
  animation-duration: 10s;
  animation-timing-function: ease;
}
@keyframes moveit {
  from {left: 0%;}
  to {left: 60%;}
}
</style>
</head>
<body>

<div class="box"></div>

</body>
</html>


animation-timing-function: ease-in

kod wynik kodu
<!DOCTYPE html>
<html>
<head>
<title>programowanie - CSS</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<meta http-equiv="Content-Language" content="pl">
<link rel="Stylesheet" type="text/css" href="style.css" />
<style type="text/css">
.box {
  width: 200px;
  height: 93px;
  margin: 50px;
  background: url("grafika/auto.jpg") no-repeat;
  position: relative;
  animation-name: moveit;
  animation-duration: 10s;
  animation-timing-function: ease-in;
}
@keyframes moveit {
  from {left: 0%;}
  to {left: 60%;}
}
</style>
</head>
<body>

<div class="box"></div>

</body>
</html>


animation-timing-function: ease-out

kod wynik kodu
<!DOCTYPE html>
<html>
<head>
<title>programowanie - CSS</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<meta http-equiv="Content-Language" content="pl">
<link rel="Stylesheet" type="text/css" href="style.css" />
<style type="text/css">
.box {
  width: 200px;
  height: 93px;
  margin: 50px;
  background: url("grafika/auto.jpg") no-repeat;
  position: relative;
  animation-name: moveit;
  animation-duration: 10s;
  animation-timing-function: ease-out;
}
@keyframes moveit {
  from {left: 0%;}
  to {left: 60%;}
}
</style>
</head>
<body>

<div class="box"></div>

</body>
</html>


animation-timing-function: ease-in-out

kod wynik kodu
<!DOCTYPE html>
<html>
<head>
<title>programowanie - CSS</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<meta http-equiv="Content-Language" content="pl">
<link rel="Stylesheet" type="text/css" href="style.css" />
<style type="text/css">
.box {
  width: 200px;
  height: 93px;
  margin: 50px;
  background: url("grafika/auto.jpg") no-repeat;
  position: relative;
  animation-name: moveit;
  animation-duration: 10s;
  animation-timing-function: ease-in-out;
}
@keyframes moveit {
  from {left: 0%;}
  to {left: 60%;}
}
</style>
</head>
<body>

<div class="box"></div>

</body>
</html>


animation-timing-function: cubic-bezier(n,n,n,n)

kod wynik kodu
<!DOCTYPE html>
<html>
<head>
<title>programowanie - CSS</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<meta http-equiv="Content-Language" content="pl">
<link rel="Stylesheet" type="text/css" href="style.css" />
<style type="text/css">
.box {
  width: 200px;
  height: 93px;
  margin: 50px;
  background: url("grafika/auto.jpg") no-repeat;
  position: relative;
  animation-name: moveit;
  animation-duration: 10s;
  animation-timing-function: cubic-bezier(0,1,1,0) ;
}
@keyframes moveit {
  from {left: 0%;}
  to {left: 60%;}
}
</style>
</head>
<body>

<div class="box"></div>

</body>
</html>