Create Hoverable Buttons with CSS

Use the CSS :hover selector to create hoverable buttons. You can try to run the following code to create hoverable buttons:


Live Demo

<!DOCTYPE html>
         .btn {
            background-color: yellow;
            color: black;
            text-align: center;
            font-size: 15px;
            padding: 20px;
            border-radius: 15px;
            border: 3px dashed blue;
         .btn:hover {
            background-color: orange;
            color: black;
            border: 3px solid blue;
      <p>Click below for result:</p>
      <button class = "btn">Result</button>