html - How to increase the duration of :active in css? -


so want green background color stay longer button being pressed. possible?

#button {    background-color: red;    width: 100px;    height: 50px;    display: block;  }  #button:active {    background-color: green;  }
<!doctype html>    <html lang="en">    <head>    <meta charset="utf-8" />    <title></title>    </head>    <body>    <a href="#" id="button">1</a>     </body>    </html>

it possible use transition

#button {    background-color: red;    width: 100px;    height: 50px;    display: block;    transition:0s 1s;  }  #button:active {    background-color: green;    transition:0s;  }
<!doctype html>    <html lang="en">    <head>    <meta charset="utf-8" />    <title></title>    </head>    <body>    <a href="#" id="button">1</a>     </body>    </html>


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -