网站首页文章详情

h5用css设置网页内容不被选中、复制

发布时间:2019-07-10 11:07编辑:胜男

<p>使用CSS设置网页内容不被选中</p><pre class="brush:html;toolbar:false">.icon&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;-webkit-touch-callout:&nbsp;none;&nbsp;/*&nbsp;iOS&nbsp;Safari&nbsp;*/ &nbsp;&nbsp;&nbsp;&nbsp;-webkit-user-select:&nbsp;none;&nbsp;/*&nbsp;Chrome/Safari/Opera&nbsp;*/ &nbsp;&nbsp;&nbsp;&nbsp;-khtml-user-select:&nbsp;none;&nbsp;/*&nbsp;Konqueror&nbsp;*/ &nbsp;&nbsp;&nbsp;&nbsp;-moz-user-select:&nbsp;none;&nbsp;/*&nbsp;Firefox&nbsp;*/ &nbsp;&nbsp;&nbsp;&nbsp;-ms-user-select:&nbsp;none;&nbsp;/*&nbsp;Internet&nbsp;Explorer/Edge&nbsp;*/ &nbsp;&nbsp;&nbsp;&nbsp;user-select:&nbsp;none;&nbsp;/*&nbsp;Non-prefixed&nbsp;version,&nbsp;currently&nbsp;not&nbsp;supported&nbsp;by&nbsp;any&nbsp;browser&nbsp;*/ }</pre><p><br/></p>