用CSS3实现网页文本禁止复制的CSS代码

2013-04-23 14:25:33  来源:网页教学网 

网页制作Webjx文章简介:用CSS3实现网页文本禁止复制的CSS代码.

实例代码1:

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Demo1</title>
<style>
.text{-moz-user-select:none;-webkit-user-select:none}
</style>
</head>
<body>
<div class="text">css3html5</div>
</body>
</html>

示例代码2

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Demo2</title>
<style>
.text{-moz-user-select:none;-webkit-user-select:none}
</style>
</head>
<body>
<div class="text" onselectstart="return false;">css3html5</div>
</body>
</html>

 

更多