Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Usage of CSS transition-timing-function property
Use the transition-timing-function property to set the speed curve of the transition effect. The values you can set are ease, ease-in, ease-out, linear, etc.
You can try to run the following code to set the speed curve of the transition effect with CSS
Example
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background: red;
transition: width 4s;
}
#effect1 {
transition-timing-function: linear;
}
#effect2 {
transition-timing-function: ease-in;
}
div:hover {
width: 250px;
}
</style>
</head>
<body>
<h1>Transition Effect</h1>
<p>Hover over the div elements and see the transition effect and the speed:</p>
<div id = "effect1">linear effect</div><br>
<div id = "effect2">ease-in effect</div><br>
</body>
</html> Advertisements
