Can anybody tell How to disable click and selection in li in css
I have tried
.disabled {
pointer-events:none;
opacity:0.6;
cursor:not-allowed;
}
but pointer is coming and able to select text how to avoid
Thanks
Can anybody tell How to disable click and selection in li in css
I have tried
.disabled {
pointer-events:none;
opacity:0.6;
cursor:not-allowed;
}
but pointer is coming and able to select text how to avoid
Thanks
You need to specify the cursor
and user-select
properties as none
.
.disabled {
pointer-events:none;
opacity:0.6;
cursor:none;
-webkit-user-select: none; /* Chrome all / Safari all */
-moz-user-select: none; /* Firefox all */
-ms-user-select: none; /* IE 10+ */
user-select: none;
}
Here is a more in-depth look at user-select
: https://css-tricks.com/almanac/properties/u/user-select/