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

twig - Using Twigbridge in a Laravel 5.1 Package -

Kivy: Swiping (Carousel & ScreenManager) -

jdbc - Not able to establish database connection in eclipse -