powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / Затемнение экрана
2 сообщений из 2, страница 1 из 1
Затемнение экрана
    #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
Затемнение экрана
    #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
2 сообщений из 2, страница 1 из 1
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / Затемнение экрана
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


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