Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / Затемнение экрана / 2 сообщений из 2, страница 1 из 1
20.05.2015, 21:43
    #38964646
tstas2004
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Затемнение экрана
Добр Всем! Подсккажите пожалуйста! Как сделать чтобы при всплывающем окне на сайте WordPress
затухал экран (сайт). Код всплывающего окна простой:

<a onmouseover='this.style.cursor="pointer" ' onfocus='this.blur();'
onclick="document.getElementById('PopUp').style.display='block'">
<span style="text-decoration: underline;">Текст ссылки для открытия окна</span></a>

<div id='PopUp' style='display: none; position: absolute; overflow: auto;
overflow-x: hidden; right: 400px; top: 50px; border: solid black 1px; padding: 10px;
background-color: rgb(255,255,225); text-align: justify; font-size: 12px; height: 300px; width: 635px;'>

Кнопка закрытия окна

<br /><div style='text-align: right;'><a onmouseover='this.style.cursor="pointer" '
style='font-size: 12px; top: 5px;' onfocus='this.blur();'
onclick="document.getElementById('PopUp').style.display = 'none' " >
<span style="text-decoration: underline;">закрыть</span></a></div>

Текст окна

Есть блок:

<style>
#opPopUp {
background: #000;
height: 100%;
opacity: 0.5;
position: fixed;
width: 100%;
z-index: 100;
top: 0;
left: 0;
}

</style>

Так вот вопрос??? как вписать в функцию открытия окна opPopUp Заранее спасибо.
...
Рейтинг: 0 / 0
20.05.2015, 23:49
    #38964712
kunaksergey
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Затемнение экрана
tstas2004,

что-то вроде:

Код: html
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
<head>
<style>
body{
	margin: 0;
	padding: 0;
}
#opPopUp {
background: #000;
height: 100%;

position: fixed;
width: 100%;
z-index: 100;
top: 0;
left: 0;
}
#content{

width: 100%;
height: 100%;
}

</style>
</head>

<body>
<div id='content' style="">
<a onmouseover='this.style.cursor="pointer" ' onfocus='this.blur();' 
onclick="document.getElementById('content').style.backgroundColor='000';
document.getElementById('content').style.opacity='0.5';
document.getElementById('PopUp').style.display='block';

">
<span style="text-decoration: underline;">Текст ссылки для открытия окна</span></a>
</div>
<div id='PopUp' style='clear:both;display: none;; position: absolute; overflow: auto; 
overflow-x: hidden; right: 400px; top: 50px; border: solid black 1px; padding: 10px; 
background-color: rgb(255,255,225); text-align: justify; font-size: 12px; height: 300px; width: 635px;'>




<div style='text-align: right;'><a onmouseover='this.style.cursor="pointer" ' 
style='font-size: 12px; top: 5px;' onfocus='this.blur();' 
onclick="document.getElementById('PopUp').style.display = 'none';
document.getElementById('content').style.backgroundColor='fff';
document.getElementById('content').style.opacity='1';
 " >
<span style="text-decoration: underline;">закрыть</span></a></div>

</body>
...
Рейтинг: 0 / 0
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / Затемнение экрана / 2 сообщений из 2, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]