Department of Mathematics and Computer Science

www.univ-soukahras.dz/en/dept/mi

Module: Technologies Web avancées

  1. Information
  2. Questions

simple animation

2 votes

i need to understand how to create a simple animation in HTML 5 or CSS3

Asked on 21:50, Tuesday 10 May 2016 By mohamed amine djoudi (14 points)
In Technologies Web avancées


answers (2)




Answer (1)

1 votes

just go to visite http://www.w3schools.com/css/css3_animations.asp and u'll understand cool

Answered on 21:58, Tuesday 10 May 2016 by abdelghani laib (77 points)
In Technologies Web avancées



Answer (2)

1 votes

tu peut essayer avec ce code :

<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background-color: red;
position: relative;
/* Chrome, Safari, Opera */
-webkit-animation-name: example;
-webkit-animation-duration: 5s;
-webkit-animation-timing-function: linear;
-webkit-animation-delay: 2s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: alternate;
/* Standard syntax */
animation-name: example;
animation-duration: 5s;
animation-timing-function: linear;
animation-delay: 2s;
animation-iteration-count: infinite;
animation-direction: alternate;
}

/* Chrome, Safari, Opera */
@-webkit-keyframes example {
0% {background-color:red; left:0px; top:0px;}
25% {background-color:yellow; left:200px; top:0px;}
50% {background-color:blue; left:200px; top:200px;}
75% {background-color:green; left:0px; top:200px;}
100% {background-color:red; left:0px; top:0px;}
}

/* Standard syntax */
@keyframes example {
0% {background-color:red; left:0px; top:0px;}
25% {background-color:yellow; left:200px; top:0px;}
50% {background-color:blue; left:200px; top:200px;}
75% {background-color:green; left:0px; top:200px;}
100% {background-color:red; left:0px; top:0px;}
}
</style>
</head>
<body>

<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>

<div></div>

</body>
</html>

Answered on 22:17, Tuesday 10 May 2016 by houssem djefaflia (95 points)
In Technologies Web avancées



Do you have an answer ?