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

คุณสมบัติ CSS ที่ผู้ใช้เลือก


ใช้ CSS เลือกผู้ใช้ คุณสมบัติเพื่อกำหนดว่าข้อความขององค์ประกอบสามารถเลือกได้หรือไม่ด้วย CSS

ตัวอย่าง

<!DOCTYPE html>
<html>
   <head>
      <style>
         div {
            user-select: none;
         }
      </style>
   </head>
   <body>
      <h2>This is demo heading</h2>
      <div>This is demo text. You won't be able to select it.</div>
   </body>
</html>