body {
min-height: 100vh;
}
.modal {
position: absolute;
top: 25%;
left: 25%;
width: 50%;
height: 50%;
z-index: 1;
display: none;
}
<body>
<div class="modal">PopUp!</div>
</body>
function setCookie(name, value, expY, expM, expD, path, domain, secure) {
var cookieString = name + "=" + escape(value);
if (expY) {
var expires = new Date(expY, expM, expD);
cookieString += "; expires=" + expires.toGMTString();
}
if (path) {
cookieString += "; path=" + escape(path);
}
if (domain) {
cookieString += "; domain=" + escape(domain);
}
if (secure) {
cookieString += "; secure";
}
document.cookie = cookieString;
}
function getCookie(cookieName) {
var results = document.cookie.match('(^|;) ?' + cookieName + '=([^;]*)(;|$)');
if (results) {
return (unescape(results[2]));
}
return null;
}
$(function () {
if (getCookie("is_shown_modal") != "1") {
$(".modal").fadeIn(500, function () {
setCookie("is_shown_modal", "1");
});
}
});
<li>
<a href="#">link</a>
<span>description</span>
</li>
a {margin-bottom: Xpx}
, где X = высота параграфа.a:not(:last-child) {margin-bottom: 0}
.li {text-align: center} span {white-space: nowrap}
git log
git checkout 3ff82ac