Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
136 changes: 136 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
.main
{
position: absolute;
top: 50px;
width: 1000px;
height: 250px;
text-align: center;
}

.images-block
{
display: none;
position: absolute;
width: 1000px;
top: 0;
}

.main > input
{
position: relative;
top: 220px;
}

.main > input:checked + .images-block
{
display: block;
}

.card
{
display: inline-block;
vertical-align: middle;
width: 20%;
position: relative;
}

.card figure
{
margin: 0;
height: 100%;
}

.img
{
max-width: 200px;
max-height: 200px;
}

.description-img
{
box-sizing: border-box;
padding: 10px;
max-width: 100%;
max-height: 100%;
}

.description
{
width: 140%;
display: none;
position: absolute;
z-index: 1;
background: #fff;
border: 1px solid;
left: -20%;
top: -10px;
}

.card .img:hover + .description,
.description:hover
{
display: block;
}

.card > input
{
display: none;
}

.big-image
{
display: none;
position: fixed;
z-index: 1;
background: rgba(128, 128, 128, .4);
top: 0;
bottom: 0;
right: 0;
left: 0;
}

.big-image img
{
max-width: 80%;
max-height: 80%;
margin: 5%;
position: relative;
z-index: 2;
}

.card > input:checked ~ .big-image
{
display: block;
}

.previous,
.next
{
width: 0;
height: 0;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
margin: 55px 0;
}

.previous
{
border-right: 50px solid #777;
float: left;
}

.next
{
border-left: 50px solid #777;
float: right;
}

.x:after
{
content: '✕';
font-size: 30px;
position: absolute;
right: 10px;
top: 5px;
color: #fff;
}
Loading