Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Антонов Алексей #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Next Next commit
Вариант без картинок
  • Loading branch information
Antonov Alexey committed Nov 14, 2016
commit 34c0e437070095d9540785c1b1f59f74b8b525db
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