Я создал диалог: < /p>
Conditions
My Conditions
Close
< /code>
css: < /p>
#dialog {
background: white;
position: absolute;
left: 25%;
top: 25%;
width: 50%;
height: 50%;
border: 1px solid rgba(0, 0, 0, 0.3);
border-radius: 6px;
box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
text-align: center;
z-index: 1000;
visibility: hidden;
}
< /code>
javascript: < /p>
$(document).ready(function () {
showStart();
document.querySelector("#show").onclick = function () {
dialog();
};
document.querySelector("#show_2").onclick = function () {
dialog();
};
});
function dialog() {
element = document.getElementById("dialog");
element.style.visibility = (element.style.visibility == "visible") ? "hidden" : "visible";
}
< /code>
Как я могу создать фон для этого диалога? Я хочу создать что -то вроде наложения на заднем плане.
Подробнее здесь: https://stackoverflow.com/questions/313 ... r-a-dialog