css如何?禁止文字被選擇(代碼)

來源:互聯網
上載者:User

本篇文章給大家帶來的內容是關於css如何?禁止文字被選擇(代碼) ,有一定的參考價值,有需要的朋友可以參考一下,希望對你有所協助。

<!DOCTYPE html><html> <head>    <meta charset="UTF-8">    <title>css禁止文字被選擇</title>    <style type="text/css">    .m-no-select {        -webkit-touch-callout: none;        /* iOS Safari */        -webkit-user-select: none;        /* Chrome/Safari/Opera */        -khtml-user-select: none;        /* Konqueror */        -moz-user-select: none;        /* Firefox */        -ms-user-select: none;        /* Internet Explorer/Edge */        user-select: none;        /* Non-prefixed version, currentlynot supported by any browser */    }    </style></head><div>可以選擇</div><div>不可以選擇</div> <body>    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>    <script type="text/javascript">    </script></body> </html>
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.