Professional Documents
Culture Documents
Day - 13 Web Development: by - Dipankar Kumar Pankaj
Day - 13 Web Development: by - Dipankar Kumar Pankaj
Day - 13 Web Development: by - Dipankar Kumar Pankaj
Web Development
• Attributes
– Behavior
• Scroll
• slide
• alternate
– Direction
• Up
• Down
• Left
• right
CSS :hover Selector
• The :hover selector is used to select elements
when you mouse over them.
• Ex. :
a:hover {
background-color: yellow;
}
• Ex. -
div {
transition-property: width;
}
div:hover {
width: 300px;
}
• The transition-duration property specifies how
many seconds (s) or milliseconds (ms) a
transition effect takes to complete.
div {
transition-duration: 5s;
}
• The transition-timing-function property specifies
the speed curve of the transition effect.
• This property allows a transition effect to
change speed over its duration.
• #div1 {transition-timing-function: linear;}
#div2 {transition-timing-function: ease;}
#div3 {transition-timing-function: ease-in;}
#div4 {transition-timing-function: ease-out;}
#div5 {transition-timing-function: ease-in-out;}
Animation
• Css animation allow you to animate HTML
element on webpage.
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background: red;
position: relative;
animation: mymove 5s infinite;
}
@keyframes mymove {
from {left: 0px;}
to {left: 200px;}
}
</style>
</head>
<body>
<div> </div>
</body>
</html>
Thank you