Sublime Text
<!DOCTYPE html> <html> <head> <title>Xem ví dụ</title> <style type="text/css"> .text1{ -webkit-user-select:auto; /*Safari*/ -moz-user-select:auto; /*Firefox*/ -ms-user-select:auto; /*IE*/ user-select:auto; } .text2{ -webkit-user-select:none; /*Safari*/ -moz-user-select:none; /*Firefox*/ -ms-user-select:none; /*IE*/ user-select:none; } .text3{ -webkit-user-select:all; /*Safari*/ -moz-user-select:all; /*Firefox*/ -ms-user-select:all; /*IE*/ user-select:all; } </style> </head> <body> <p class="text1">(1) Các bạn có thể bôi đen văn bản bên trong đoạn văn bản này.</p> <p class="text2">(2) Các bạn không thể bôi đen văn bản bên trong đoạn văn bản này.</p> <p class="text3">(3) Chỉ với một cú nhấp chuột, các bạn có thể bôi đen toàn bộ đoạn văn bản này.</p> </body> </html>
<!DOCTYPE html> <html> <head> <title>Xem ví dụ</title> <style type="text/css"> .text1{ -webkit-user-select:auto; /*Safari*/ -moz-user-select:auto; /*Firefox*/ -ms-user-select:auto; /*IE*/ user-select:auto; } .text2{ -webkit-user-select:none; /*Safari*/ -moz-user-select:none; /*Firefox*/ -ms-user-select:none; /*IE*/ user-select:none; } .text3{ -webkit-user-select:all; /*Safari*/ -moz-user-select:all; /*Firefox*/ -ms-user-select:all; /*IE*/ user-select:all; } </style> </head> <body> <p class="text1">(1) Các bạn có thể bôi đen văn bản bên trong đoạn văn bản này.</p> <p class="text2">(2) Các bạn không thể bôi đen văn bản bên trong đoạn văn bản này.</p> <p class="text3">(3) Chỉ với một cú nhấp chuột, các bạn có thể bôi đen toàn bộ đoạn văn bản này.</p> </body> </html>