武林網(www.49028c.com)文章簡介:用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>
新聞熱點
疑難解答