日期:2014-04-20  浏览次数:21238 次

网页制造aiyiweb文章简介:用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>