Skip to content

Instantly share code, notes, and snippets.

Created October 14, 2017 06:19
Show Gist options
  • Save anonymous/d7cc18b09814b53b9773e5e554cfaffc to your computer and use it in GitHub Desktop.
Save anonymous/d7cc18b09814b53b9773e5e554cfaffc to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.content {
width: 600px;
margin: 0 auto;
}
.modal {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,0.4);
}
.modal .card {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 600px;
background-color: #fff;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.card header,
.card footer
{
background-color: #22d0b2;
color: #fff;
padding: 1px 16px;
}
.card .close {
float: right;
margin-top: 16px;
font-size: 20px;
cursor: pointer;
}
.card section {
padding: 16px;
}
</style>
</head>
<body>
<div class="content">
<h1>内容</h1>
<h1>内容</h1>
<h1>内容</h1>
<div class="modal">
<div class="card">
<header>
<span class="close">×</span>
<h3>Title</h3>
</header>
<section>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</section>
<footer>
<p>Footer</p>
</footer>
</div>
</div>
</div>
<script id="jsbin-source-css" type="text/css">.content {
width: 600px;
margin: 0 auto;
}
.modal {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,0.4);
}
.modal .card {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 600px;
background-color: #fff;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.card header,
.card footer
{
background-color: #22d0b2;
color: #fff;
padding: 1px 16px;
}
.card .close {
float: right;
margin-top: 16px;
font-size: 20px;
cursor: pointer;
}
.card section {
padding: 16px;
}</script>
</body>
</html>
.content {
width: 600px;
margin: 0 auto;
}
.modal {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,0.4);
}
.modal .card {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 600px;
background-color: #fff;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.card header,
.card footer
{
background-color: #22d0b2;
color: #fff;
padding: 1px 16px;
}
.card .close {
float: right;
margin-top: 16px;
font-size: 20px;
cursor: pointer;
}
.card section {
padding: 16px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment