With CSS Transitions, we can add an effect when changing from one style to another, without using Flash animations or JavaScripts. CSS transitions allows you to change property values smoothly, over a given duration. Mouse over the element below to see a CSS transition effect. Devsocial.net offers free online tutorials, references and free SEO Tools the world wide web design library.
Transition
property is used as follows Example Below. Hover
on top of this Div
:Div
.<style>
.divnamehere
{
width:100px;
height:100px;
background:green;
transition-property:width;
transition-duration:1s;
transition-timing-function:linear;
transition-delay:1s;
/* Safari */
-webkit-transition-property:width;
-webkit-transition-duration:1s;
-webkit-transition-timing-function:linear;
-webkit-transition-delay:1s;
padding-top:20px;
font-size:20px;
color:#fff;
}
.divnamehere:hover
{ width:500px; }
</style>
Property | Description | CSS |
---|---|---|
Transition | A shorthand property for setting the four transition properties into a single property | 3 |
Transition-Property | Specifies the name of the CSS property to which the transition is applied | 3 |
Transition-Duration | Defines the length of time that a transition takes. Default 0 | 3 |
Transition-Timing-Function | Describes how the speed during a transition will be calculated. Default "ease" | 3 |
Transition-Delay | Defines when the transition will start. Default 0 | 3 |
linear
ease
ease-in
ease-out
ease-in-out
|
The CSS & HTML
*Please Note that our credits or the authors credit must stay intact !
Capable:
Note: Make sure your page contains a valid doctype for this menu to render properly.
Revision History: Nov 8th, 2023': updated code..
Usage Terms: | Please Read - -> >
Viewed: 42,035
Share our library with others. Spread the love. Share:
Was this article & Examples Helpful ?
If so you can help us bring this and more to become available for you at anytime. You can help us by donating any amount or Sharing & Following Us. Donate through PayPal.
More useful links: