I have a form that works like a settings page. When form elements are changed, they are marked as unsaved and have a different border color. When the shape is saved, they are marked as saved using a different border color.
I want the border to disappear gradually while maintaining shape.
The order will go:
<input type='text' class='unsaved' /> Not saved yet, border is yellow <input type='text' class='saved' /> Saved, so the border is green <input type='text' class='' /> Fade out if coming from class saved
If I can get the CSS3 transition to run when the saved class is deleted, then it may disappear and everything will be hard. I currently have to manually animate it (using the plugin, of course), but it looks volatile, and I would like to move the code in CSS3 to make it smoother.
I only need this to work in Chrome and Firefox 4+, although others would be fine.
CSS
Here is the related CSS:
.unsaved { border: 3px solid #FFA500; padding: 0; } .saved { border: 3px solid #0F0; padding: 0; }
I would like to work in the following transition (or something like this):
border-color: rgba(0,0,0,0); -webkit-transition: border-color .25s ease-in; -moz-transition: border-color .25s ease-in; -o-transition: border-color .25s ease-in; transition: border-color .25s ease-in;
Note:
Personally, I do not agree with this user interaction scheme, but how our program leader wants it. Please do not suggest me to change the way I work. Thank!
css css3 css-transitions
tjameson Mar 01 2018-12-12T00: 00Z
source share