CSS pointer-events Właściwość
Przykład
Ustaw, czy element powinien reagować na zdarzenia wskaźnika:
div.ex1 {
pointer-events: none;
}
div.ex2 {
pointer-events: auto;
}
Definicja i użycie
Właściwość pointer-events
określa, czy element reaguje na zdarzenia wskaźnika.
Domyślna wartość: | automatyczny |
---|---|
Dziedziczny: | tak |
Animowalny: | Nie . Przeczytaj o animacji |
Wersja: | CSS3 |
Składnia JavaScript: | obiekt .style.pointerEvents="brak" |
Obsługa przeglądarki
Liczby w tabeli określają pierwszą wersję przeglądarki, która w pełni obsługuje tę właściwość.
Property | |||||
---|---|---|---|---|---|
pointer-events | 2.0 | 11.0 | 3.6 | 4.0 | 9.0 |
Składnia CSS
pointer-events: auto|none;
Wartości nieruchomości
Property Value | Description |
---|---|
auto | The element reacts to pointer events, like :hover and click. This is default |
none | The element does not react to pointer events |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |