JSFiddle - React, Tailwind, and code Playground
by satantx
HTML
<a href="" class="button popup">Нажать нежно</a>
<div class="overlay-block">
<div class="overlay">
<div class="title">Товар добавлен в корзину</div>
<ul class="over-list">
<li><a href="" class="button go">Продолжить покупки</a></li>
<li><a href="" class="green">Перейти в корзину</a></li>
</ul>
</div>
</div>
CSS
body {
font-family: verdana;
font-size: 12px;
}
a.button {
display: inline-block;
border: 1px solid #345D90;
background: #4679BD;
box-shadow: 0 1px 1px 0px #345D90, inset 0 1px 0 0px rgba(255,255,255,0.4);
height: 26px;
text-decoration: none;
color: #fff;
line-height: 26px;
padding: 0 15px;
border-radius: 2px;
}
a.button:hover {
background: #4B81C6;
}
a.button:active {
background: #3E6AA2;
box-shadow: 0 1px 0 0px #fff;
}
a.green {
display: inline-block;
border: 1px solid #719D50;
background: #81C06B;
box-shadow: 0 1px 1px 0px #5F9052, inset 0 1px 0 0px rgba(255,255,255,0.4);
height: 26px;
text-decoration: none;
color: #fff;
line-height: 26px;
padding: 0 15px;
border-radius: 2px;
}
a.green:hover {
background: #83CB6F;
}
a.green:active {
background: #74AA62;
box-shadow: 0 1px 0 0px #fff;
}
.overlay-block {
position: fixed;
left: 0; top: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
display: none;
}
.overlay {
position: absolute;
left: 50%; top: 50%;
width: 360px;
/* height: 140px; */
padding: 20px;
margin-left: -200px;
margin-top: -90px;
text-align: center;
background: #FCFCFC;
border-radius: 3px;
}
.overlay-block .title {
font-size: 16px;
margin-bottom: 20px;
}
.over-list li {
float: left;
width: 50%;
}
JavaScript
$('.popup').click(function(){
$('.overlay-block').fadeIn(200);
return false;
});
$('.go').click(function(){
$('.overlay-block').fadeOut(200);
return false;
});