Thursday, December 1, 2016

Make text non-selectable on double click in HTML - CSS way

There is a pure CSS3 way of making a paragraph, button or even SVG element non selectable. Here it is:

    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    user-select: none;

<p class='nonselectable'>

You cannot select this text


No comments:

Post a Comment

Ubuntu 12.04, 14.04, 16.04 - auto start an app or script before login

To run a command or application at startup, even before the user has logged in, you can use this file: /etc/rc.local The commands entered...