The site works on Bitrix, you need to make a dynamic button with three positions:

  1. resting state
  2. hover state
  3. state while pressing

All info I can find applies only to CSS. Thanks to everyone who responds!

    3 answers 3

    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" ""> <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(){"#FF00FF";} button.onmouseout=function(){"#FFFF00";} button.onmousedown=function(){"#FF0000";} </script> </body> </html>