проблема:
Как видно на изображении
Темная часть модального окна охватывает только сервисы.
Результат:
Мне нужно, чтобы оно покрыло все окно, похожее на изображение ниже.
Последнее обновление
> В CSS изменился < /p>
width: 100%;
height: 100%;
< /code>
to < /p>
width: 100vw; /* Full viewport width */
height: 100vh; /* Full viewport height */
И это дает ниже вывод, который все еще не похож на изображение выше (обязательно)
edit: В то время как я попробую еще раз, если у вас уже есть какая -то идея, пожалуйста, пропустите некоторые изменения, чтобы внести в себя для достижения result
, если я могу спросить , Как работает код. то есть, ограничен ли модальный диалог div, который его называют или ограничены CSS, который его делает? < /p>
Контекст: < /strong>
В Jekyll, index.html -> home.html -> base.html -> body -wrapper.html -> (buy.html, sellow.html, leasing.html и т. Д.) < /p>
body-wrapper.html
.
.
.
.
{% include buying.html %}
{% include selling.html %}
.
.
Services
buying.html
Buying
First, I will help you obtain a pre-approval document from a reliable, re....sive l...w ...click here
{% include modal.html modal-name='buyModal' modal-data='This is a simple modal popup example in Jekyll' %}
modal.html
×
Modal Header
{{ include.modal-data }}
модал-videos.css
/* Modal styles */
/* Modal background */
.modal {
display: none; /* Hidden by default */
position: fixed;
z-index: 9990 !important; /* Sit on top */
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
animation: fadeIn 0.5s;
}
/* Modal Content */
.modal-content {
background: white !important; /* Ensures modal is white */
z-index: 9999 !important; /* Sit on top */
border-radius: 8px;
margin: 15% auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
max-width: 600px;
animation: slideIn 0.5s;
}
/* Close button */
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
/* Fade in animation */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Slide in animation */
@keyframes slideIn {
from {
transform: translateY(-50px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
модал-Videos.js
// Open modal functionality
document.querySelectorAll('.open-modal').forEach((button) => {
button.addEventListener('click', (event) => {
event.preventDefault(); // Prevent default link behavior
const modalId = button.getAttribute('data-modal');
const modal = document.getElementById(modalId);
modal.style.display = 'block';
});
});
// Close modal functionality
document.querySelectorAll('.close').forEach((button) => {
button.addEventListener('click', () => {
const modalId = button.getAttribute('data-modal');
const modal = document.getElementById(modalId);
modal.style.display = 'none';
});
});
// Close modal when clicking outside of it
window.addEventListener('click', (event) => {
document.querySelectorAll('.modal').forEach((modal) => {
if (event.target === modal) {
modal.style.display = 'none';
}
});
});
Подробнее здесь: https://stackoverflow.com/questions/794 ... ire-window
Модальное окно, показывающее в разделе, когда оно должно отображаться во всем окне [закрыто] ⇐ Html
Программисты Html
1739602687
Anonymous
[b] проблема: [/b]
Как видно на изображении
Темная часть модального окна охватывает только сервисы.
[b] Результат: [/b]
Мне нужно, чтобы оно покрыло все окно, похожее на изображение ниже.
[b] Последнее обновление [/b]
> В CSS изменился < /p>
width: 100%;
height: 100%;
< /code>
to < /p>
width: 100vw; /* Full viewport width */
height: 100vh; /* Full viewport height */
И это дает [b] ниже [/b] вывод, который все еще не похож на изображение [b] выше [/b] (обязательно)
[b] edit: В то время как я попробую еще раз, если у вас уже есть какая -то идея, пожалуйста, пропустите некоторые изменения, чтобы внести в себя для достижения result [/b]
, если я могу спросить , Как работает код. то есть, ограничен ли модальный диалог div, который его называют или ограничены CSS, который его делает? < /p>
[b] Контекст: < /strong>
В Jekyll, index.html -> home.html -> base.html -> body -wrapper.html -> (buy.html, sellow.html, leasing.html и т. Д.) < /p>
body-wrapper.html [/b]
.
.
.
.
{% include buying.html %}
{% include selling.html %}
.
.
Services
[b] buying.html[/b]
[url=#buyModal]
Buying
First, I will help you obtain a pre-approval document from a reliable, re....sive l...w ...click here
[/url]
{% include modal.html modal-name='buyModal' modal-data='This is a simple modal popup example in Jekyll' %}
[b] modal.html[/b]
×
Modal Header
{{ include.modal-data }}
[b] модал-videos.css[/b]
/* Modal styles */
/* Modal background */
.modal {
display: none; /* Hidden by default */
position: fixed;
z-index: 9990 !important; /* Sit on top */
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
animation: fadeIn 0.5s;
}
/* Modal Content */
.modal-content {
background: white !important; /* Ensures modal is white */
z-index: 9999 !important; /* Sit on top */
border-radius: 8px;
margin: 15% auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
max-width: 600px;
animation: slideIn 0.5s;
}
/* Close button */
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
/* Fade in animation */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Slide in animation */
@keyframes slideIn {
from {
transform: translateY(-50px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
[b]модал-Videos.js[/b]
// Open modal functionality
document.querySelectorAll('.open-modal').forEach((button) => {
button.addEventListener('click', (event) => {
event.preventDefault(); // Prevent default link behavior
const modalId = button.getAttribute('data-modal');
const modal = document.getElementById(modalId);
modal.style.display = 'block';
});
});
// Close modal functionality
document.querySelectorAll('.close').forEach((button) => {
button.addEventListener('click', () => {
const modalId = button.getAttribute('data-modal');
const modal = document.getElementById(modalId);
modal.style.display = 'none';
});
});
// Close modal when clicking outside of it
window.addEventListener('click', (event) => {
document.querySelectorAll('.modal').forEach((modal) => {
if (event.target === modal) {
modal.style.display = 'none';
}
});
});
Подробнее здесь: [url]https://stackoverflow.com/questions/79427030/modal-window-showing-within-a-section-when-it-should-show-on-entire-window[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия