html - How to make a ccs transition only forward -
I have an app that changes from opacity 0 to opacity 1 if you hover a div, then I get the CSS transition How can i 2 for "0 to 1" opacity change and not for "1 to 0"
You can do this by simply adding CSS to the transition to Hover State CSS.
HTML gt; & Lt; / Div & gt; CSS div {width: 100px; Height: 100 pixels; Background: green; } div: Hover {Opacity: 0; Transition: Opacity .2s; } demo
gt; & Lt; / Div & gt; CSS div {width: 100px; Height: 100 pixels; Background: green; } div: Hover {Opacity: 0; Transition: Opacity .2s; } demo
Comments
Post a Comment