/
githubmirror
/
servo
Обзор
Документация
Войти
/
githubmirror
/
servo
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/html/pointer_events.html
35 строк
624 B
Patrick Walton
layout: Implement `pointer-events: none` per SVG 1.1 § 16.6.
08 янв 2015, 19:32
08 янв 2015, 19:32
899c942
Код
Авторство
О чём код?
<!DOCTYPE html> <html> <head> <style> #overlay { width: 200px; height: 150px; background: green; opacity: 0.5; pointer-events: none; } button { position: relative; top: 10px; width: 150px; height: 50px; border: solid black 2px; box-sizing: border-box; font: Helvetica bold; font-size: 18px; text-align: center; background: black; color: white; } </style> </head> <body> <button id=button>Click me!</button> <div id=overlay></div> <script> document.getElementById('button').addEventListener('click', function() { alert("Ouch!"); }); </script> </body> </html>