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
What are CSS Transitions?
With the transition effect, you can easily change the property values. You can also set a duration.
Let us try to change the height of an element:
Example
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 150px;
height: 150px;
background: blue;
transition: width 3s;
}
div:hover {
height: 200px;
}
</style>
</head>
<body>
<h1>Heading One</h1>
<p>Hover over the below box to change its height.</p>
<div></div>
</body>
</html> Advertisements
