/* Transition-delay: The transition-delay property specifies a delay (in seconds) for the transition effect. */
transition-delay: 1s;
/* Transition-duration: Determines how many seconds or milliseconds a transition effect takes to complete */
transition-duration: 2s;
/* Transition-timing-function: This property allows a transition effect to change speed over its duration. */
transition-timing-function: linear;
/* Transition-property: Specifies the name of the CSS property the transition effect is for */
transition-property: none;
/* Transition: Shorthand Property. The transition property is a shorthand property for: transition-property transition-duration transition-timing-function transition-delay */
transition: all 4s ease-in-out 1s;
div:hover {
background-color: #000;
transition: background-color 400ms;
}
/* Or control over animation with transition timing */
div:hover {
background-color: #000;
transition: background-color 400ms ease-in-out;
}
/* timing - linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(n,n,n,n) */
img {
height: 400px;
width: 400px;
transition: height 0.5s linear, width 0.5s linear;
}
.box {
border-style: solid;
border-width: 1px;
display: block;
width: 100px;
height: 100px;
background-color: #0000FF;
transition: width 2s, height 2s, background-color 2s, transform 2s;
}
.box:hover {
background-color: #FFCCCC;
width: 200px;
height: 200px;
transform: rotate(180deg);
}
details[open] summary ~ * {
animation: sweep .5s ease-in-out;
}
@keyframes sweep {
0% {opacity: 0; transform: translateX(-10px)}
100% {opacity: 1; transform: translateX(0)}
}
/*CSS Transition Syntax*/
selector {
transition: property duration timing-function delay|initial|inherit;
}
div {
width: 100px;
height: 100px;
background: red;
transition: width 2s;
}
div:hover {
width: 300px;
}
/* width slowly increase to 300px when you hover on div */
transition: property duration timing-function delay|initial|inherit;
Code Example |
---|
Css :: Responsive Web Design with HTML5 and CSS |
Css :: hamburger icon css3 |
Css :: nmap output ip only |
Css :: position absolute and relative css |
Css :: changong text color css |
Css :: fonts for css |
Css :: allfont cdn |
Css :: css push div down |
Css :: enable bootstrap intellisence vs code |
Css :: css flex cards |
Css :: what is flex 1 in css |
Css :: first-letter css |
Css :: phone css |
Css :: circle as a pseudo element |
Css :: insert on positions CSS |
Css :: codemirror resizable |
Css :: selectors in css |
Css :: css hide select label |
Css :: css quitar el icono de lista |
Css :: rem css |
Css :: profile page html css template |
Css :: flexbox css |
Css :: error 404 flask on css file |
Css :: how to remove default border |
Css :: circle css animation |
Css :: outline offset css |
Css :: html css practice projects |
Css :: page html css template |
Css :: css nearest neighbor |
Css :: align center without using margin |