Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

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

Writer Andrew Henderson

How can I combine CSS cursor: not-allowed and pointer-events: none; not-allowed seems not to appear

.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }
.pointer-events-none { pointer-events: none; }
<button>cursor-default</button>
<button>cursor-not-allowed</button>
<button>pointer-events-none</button>
<button>cursor-not-allowed + pointer-events-none</button>

Small sample, please have a look a the forth button cursor: not-allowed did'nt look the button, but show an looked icon.

5

1 Answer

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>
<button>Some Text</button>
</div>

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

2