Home  >  Article  >  Web Front-end  >  CSS user selection properties

CSS user selection properties

PHPz
PHPzforward
2023-08-25 15:25:091203browse

CSS 用户选择属性

Using CSS user-select The attribute sets whether the text of the element can be selected using CSS

Example

Onsite Demo

<!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&#39;t be able to select it.</div>
   </body>
</html>

The above is the detailed content of CSS user selection properties. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete