Home > Web Front-end > HTML Tutorial > css3实现的文本无法选中效果_html/css_WEB-ITnose

css3实现的文本无法选中效果_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:28:34
Original
1212 people have browsed it

css3实现的文本无法选中效果:
在实际应用中可能有这样的需求,那就是设置指定元素中的文本不可以选中。
css3中指定属性可以实现此功能,下面就通过代码实例介绍一下如何实现此功能。
代码如下:

<!DOCTYPE html><html><head><meta charset=" utf-8"><meta name="author" content="http://www.softwhy.com/" /><title>蚂蚁部落</title><style type="text/css"> div{   -moz-user-select:none;   -khtml-user-select:none;   -webkit-user-select:none;  -o-user-select:none;  -ms-user-select:none;  user-select:none;  background:#CCC;  font-size:12px;  text-align:center;  width:300px;  height:150px;} </style> </head> <body> <div>蚂蚁部落欢迎您</div></body> </html>
Copy after login

原文地址是:http://www.softwhy.com/forum.php?mod=viewthread&tid=15482

更多内容可以参阅:http://www.softwhy.com/divcss/

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template