en.javascript.info/03-more/11-css-for-js/05-position/01-modal-window/solution/index.html
Ilya Kantor f301cb744d init
2014-10-26 22:10:13 +03:00

45 lines
1.6 KiB
HTML
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<style>
/* модальный DIV, который всё перекрывает */
#box {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 999; /* нужно если в документе есть элементы с z-index > 0 */
background: #aef;
opacity: 0.7;
}
p, button { margin: 35px; }
</style>
</head>
<body>
<div id="box"></div>
<button onclick="alert('Эта кнопка не должна работать')">Эта кнопка не работает</button>
<p>Текст Текст Текст</p>
<button onclick="alert('Эта кнопка не должна работать')">Эта кнопка не работает</button>
<p>Текст Текст Текст</p>
<button onclick="alert('Эта кнопка не должна работать')">Эта кнопка не работает</button>
<p>Текст Текст Текст</p>
<button onclick="alert('Эта кнопка не должна работать')">Эта кнопка не работает</button>
<p>Текст Текст Текст</p>
<button onclick="alert('Эта кнопка не должна работать')">Эта кнопка не работает</button>
<p>Текст Текст Текст</p>
<button onclick="alert('Эта кнопка не должна работать')">Эта кнопка не работает</button>
<p>Текст Текст Текст</p>
<button onclick="alert('Эта кнопка не должна работать')">Эта кнопка не работает</button>
</body>
</html>