Dynamic button in php

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

  1. rest state
  2. mouseover state
  3. state at time of click

All the info I can find is about CSS only. Thanks to everyone who responds!

Answer 1, authority 100%

PHP is not a markup language, and you can’t make an interface with it.
Dig into JavaScript and CSS.

Answer 2, authority 100%

Why don’t you like CSS tools? 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 }   /*      */

Answer 3, authority 75%

Here is an elementary example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
top: 5px;
left: 5px;
width: 60px;
height: 20px;
text-align: center;
background-color: #FFFF00;
border-radius: 5px;
<div id="button"></div>
var button=document.getElementById("button");

Leave a reply

Please enter your comment!
Please enter your name here