Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

การกำหนดสีเคอร์เซอร์ในองค์ประกอบด้วย CSS


เพื่อกำหนดสีเคอร์เซอร์ ให้ใช้คุณสมบัติ CSS caret-color คุณสามารถลองรันโค้ดต่อไปนี้เพื่อนำคุณสมบัติ caret-color ไปใช้ได้

ตัวอย่าง

<!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>