Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to combine cursor: not-allowed and pointer-events: none; [duplicate]

People also ask

How do you combine cursor not allowed and pointer events none?

you can't do this because pointer-events: none; disable all mouse functions, but you can do a trick and wrap your button with a div then use cursor: not-allowed; on this. Work great.

What will happen if the cursor property value is set to none?

Answer: No cursor will be displayed.


you can't do this because pointer-events: none; disable all mouse functions, but you can do a trick and wrap your button with a div then use cursor: not-allowed; on this.

.pointer-events-none {
    pointer-events: none;
}

.wrapper {
    cursor: not-allowed;
}
<div class="wrapper">
<button class="pointer-events-none">Some Text</button>
</div>

Add CSS cursor property when using "pointer-events: none"