The site works on Bitrix, you need to make a dynamic button with three positions:
- resting state
- hover state
- state while pressing
All info I can find applies only to CSS. Thanks to everyone who responds!
PHP is not a markup language, and the interface cannot be made with it. Dig in the direction of JavaScript and CSS.
And why CSS tools are not satisfied? If the site is not designed for iOS and Android, then pseudo-classes normally solve your problem.
a:link { color: red } /* не посещенная ссылка */ a:visited { color: blue } /* посещенная ссылка */ a:hover { color: yellow } /* при наведении */ a:active { color: lime } /* при нажатии */
Here is an elementary example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Кнопка</title> <style> #button{ absolute; top: 5px; left: 5px; width: 60px; height: 20px; text-align: center; background-color: #FFFF00; border-radius: 5px; } </style> </head> <body> <div id="button">Кнопка</div> <script> var button=document.getElementById("button"); button.onmouseover=function(){button.style.backgroundColor="#FF00FF";} button.onmouseout=function(){button.style.backgroundColor="#FFFF00";} button.onmousedown=function(){button.style.backgroundColor="#FF0000";} </script> </body> </html>
Source: https://ru.stackoverflow.com/questions/103077/
All Articles