CSS pointer-events Свойство
Пример
Определяет, должен ли элемент реагировать на события указателя:
div.ex1 {
pointer-events: none;
}
div.ex2 {
pointer-events: auto;
}
Определение и использование
Свойство pointer-events
определяет, реагирует ли элемент на события указателя.
Значение по умолчанию: | auto |
---|---|
Inherited: | yes |
Animatable: | No. Читайте о animatable |
Version: | CSS3 |
Синтаксис JavaScript: | object.style.pointerEvents="none" |
Поддержка браузера
Номера в таблице указывают первую версию браузера, которая полностью поддерживает свойство.
Свойство | |||||
---|---|---|---|---|---|
pointer-events | 2.0 | 11.0 | 3.6 | 4.0 | 9.0 |
Синтаксис CSS
pointer-events: auto|none;
Значения свойств
Значение свойства | Описание |
---|---|
auto | Элемент реагирует на события указателя, например: hover и Click. Это значение по умолчанию |
none | Элемент не реагирует на события указателя |
initial | Присваивает этому свойству значение по умолчанию. (Читайте о initial) |
inherit | Наследует это свойство из родительского элемента. (Читайте о inherit) |