JSFiddle - React, Tailwind, and code Playground
by tjerabek
HTML
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700|Oxygen' rel='stylesheet' type='text/css'>
<div class="popup">
<a href="" class="close">Close</a>
<header>
<h2>Rezervace daru</h2>
</header>
<div class="description">
<img src="http://placehold.it/150x150" width="150" height="150" alt="Obrázek daru Mac Book Pro" class="gift-image" />
<h3>Mac Book Pro 13"</h3>
<p>
Nový počítač pro Toma na práci a zábavu. Lepší by byl s SSD diskem, ale i v základu dobré ;)
</p>
</div>
<ul class="links">
<li><a href="">http://www.alfacomp.cz/dakjkdfa5d445d4fa...</a></li>
<li><a href="">http://www.apple.cz/dakjkdfa5d445d5644fa...</a></li>
</ul>
<footer>
<a href="" class="button confirm">Rezervovat dar</a>
<p class="footnote">Dar nebude automaticky zakoupen. Použijte některý z uvedených odkazů.</p>
</footer>
</div>
CSS
*{
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
}
body{
background: #f5f5f5;
color: #333;
}
.popup{
width: 30%;
margin: 0 auto;
margin-top: 10%;
min-width: 450px;
background: white;
padding: 3em 3em 2em 3em;
-webkit-box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1);
box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1);
margin-top: -100%;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
position: relative;
}
.popup h2{
font-size: 2.5em;
text-align: center;
font-family: 'Open Sans', sans-serif;
margin-bottom: 1em;
}
.popup p{
line-height: 1.5em;
margin: 1em 0 2em 0;
font-family: 'Open Sans', sans-serif;
}
.popup .close{
position: absolute;
right: 1em;
top: 1em;
width: 14px;
height: 14px;
overflow: hidden;
}
.popup .close:before{
content: '';
width: 14px;
height: 14px;
display: inline-block;
background: url("http://twitter.github.com/bootstrap/assets/img/glyphicons-halflings.png");
opacity: 0.5;
background-position: -312px 0;
}
.popup footer{
text-align: center;
}
.popup .footnote{
font-size: 0.8em;
color: #aaa;
margin: 1em 0 0 0;
line-height: 1.2em;
}
.popup .gift-image{
float: left;
margin-right: 1em;
}
.popup .description{
}
.popup h3{
font-size: 1.3em;
margin-bottom: 0;
font-family: 'Open Sans', sans-serif;
}
.button{
display: inline-block;
background: gray;
padding: 0.5em 1em;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
text-decoration: none;
color: white;
font-weight: bold;
font-family: 'Open Sans', sans-serif;
}
.button.confirm{
clear: both;
border: 1px...
JavaScript
$(document).ready(function() {
$('.popup').css('margin-top', '10%');
$('.popup .close, .popup .button.confirm').click(function(){
$('.popup').css('margin-top', '-100%');
return false;
});
});