Восстановление значения после ховер
Как после того как я убрал курсор с элемента восстановить старое значение opacity?
|
Так оно и так должно восстанавливаться
<html> <head> <meta charset="windows-1251" /> <style> .first{ background: blue; color: white; position: absolute; top: 10px; width: 200px; height: 200px } .second{ opacity: 1; background: red; color: white; position: absolute; top: 10px; width: 200px; height: 200px } a:hover{opacity: 0.1} </style> </head> <body> <a id="first" class="first">FIRST</a> <a id="second" class="second"></a> <script> </script> </body> </html> |
Анимации то нет, а он нужна.
|
<html> <head> <meta charset="windows-1251" /> <style> .first{ background: blue; color: white; position: absolute; top: 10px; width: 200px; height: 200px; -webkit-transition: all 1s; -moz-transition: all 1s; -o-transition: all 1s; transition: all 1s; } .second{ opacity: 1; background: red; color: white; position: absolute; top: 10px; width: 200px; height: 200px; -webkit-transition: all 1s; -moz-transition: all 1s; -o-transition: all 1s; transition: all 1s; } a:hover{opacity: 0.1} </style> </head> <body> <a id="first" class="first">FIRST</a> <a id="second" class="second"></a> <script> </script> </body> </html> |
Часовой пояс GMT +3, время: 08:55. |