Specify the color of the cursor in elements with CSS

CSSWeb DevelopmentFront End Technology

To set the cursor color, use the CSS caret-color property. You can try to run the following code to implement the caret-color property

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         .demo {
            caret-color: blue;
          }
      </style>
   </head>
   <body>
      <p>Place the mouse cursor below to see a blue color cursor</p>
      <input class = "demo" value = "Blue Cursor"><br><br>
   </body>
</html>
raja
Published on 31-May-2018 14:42:24
Advertisements