Answers for "css on click"

6

css on click

<!DOCTYPE html>
<html>
<head>
  <style>
    /* On click: */
    a:active {
      background-color: yellow;
    }
    button:focus {
      background-color: yellow;
    }
    /* On hover: */
    h1:hover {
      background-color: red;
    }
    p:hover {
      background-color: red;
    }
  </style>
</head>
<body>
  <a href="#">Click Me</a>
  <button>Click me</button>
  
  <h1>Hover over me</h1>
  <p>Hover over me</p>
</body>
</html>
Posted by: Guest on October-25-2020
1

html button remove border on click

.x-btn:focus, .button:focus, [type="submit"]:focus {
   outline: none;
}
Posted by: Guest on March-20-2020
6

css clicked event

CSS clicked event
:active {
  css declarations;
}
Posted by: Guest on July-17-2020
2

css on click

something:active {}
Posted by: Guest on October-08-2020

Browse Popular Code Answers by Language