Is there a CSS property that sets the duration of another CSS property (not a transition from one state to another, namely, duration), for example, if there is an erroneous validation, the red frame should be lit for 5 seconds
<style> input:valid:not([type="submit"]) { border:2px solid green; } .a:invalid:not(:focus):not(:placeholder-shown) { border:2px solid red; transition:2s; } </style> <form onsubmit="go(); return false"> <span>введите имя</span><input class="a" placeholder=" " id="name" type="text" required pattern="[А-Яа-яЁё]{5,15}"><br> <span>введите фамилию</span><input class="a" placeholder=" " id="surname" type="text" required pattern="[А-Яа-яЁё]{5,15}"><br> <input type="submit" value="сохранить" > </form>
.a:invalid {transition:color .5s, color .5s;}It seems to be possible, but I'm not sure, but there is no time to check now. In general, you can set a few transitions, I think this is what you need. Read more, read here - Georgy Potapov