Is it possible to remove child element transitions in CSS.
Here my problem is,
I have a div that consists of one H1 tag and one div (the div contains one P tag).
When I apply transition to parent div it's applying to the child elements also. But it is not needed.
How can I disable the transitions for child elements?
Here my parent div CSS code snippet:
-webkit-transition: width .75s ease;
-moz-transition: width .75s ease;
-o-transition: width .75s ease;
transition: width .75s ease;
The transitions is applied when parent width changes.
-webkit-transition: none;
-moz-transition: none;
-o-transition: none;
-ms-transition: none;
transition: none;
Apply a transition of 0s
to all child elements.
.myElement *{
-webkit-transition: width 0s;
-moz-transition: width 0s;
-o-transition: width 0s;
transition: width 0s;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With