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

Голубев Дмитрий #47

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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 Baklazhan.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Gribochek.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Grusha.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Kapusta.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Kartoha.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Kukumber.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Kukuruza.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Morkovka.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Perec.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pomidorchik.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tibloko.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tikva.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added aubergine.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cabbage.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added carrot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added corn.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cucumber.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
180 changes: 180 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
html,
body
{
width: 100%;
height: 100%;
}

img
{
width: 130px;
height: 140px;
}

h4
{
text-align: center;
display: none;
margin: 0;
padding: 0;
height: 30px;
}

a
{
max-width: 0;
max-height: 0;
color: black;
text-decoration: none;
}

.gallery
{
position: absolute;
height: 200px;
width: 580px;
overflow: hidden;
left: 25%;
top: 30%;
}

.gallery-first-block,
.gallery-second-block,
.gallery-third-block
{
position: absolute;
width: 580px;
height: 180px;
-webkit-transition: left 1s ease-out;
-moz-transition: left 1s ease-out;
-o-transition: left 1s ease-out;
transition: left 1s ease-out;
}

.gallery-item
{
display: inline-block;
width: 140px;
height: 180px;
}

.close-button
{
font-size: 45px;
display: none;
}

.close-button:hover
{
background-color: rgba(166,166,166, .5);
}

div:target
{
position: fixed;
width: 100%;
height: 100%;
background-color: rgba(166,166,166, .5);
top: 0;
left: 0;
}

div:target img
{
display: block;
width: 50%;
height: 50%;
margin: 5% auto;
cursor: default;
}

div:target div
{
display: inline;
margin-left: 85%;
cursor: default;
}

div:target:hover h4
{
display: none;
}

div > div > div:hover

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Очень неудобный селектор, лучше заменить на классы

{
box-shadow: 0 0 5px rgba(0, 0, 0, .5);
}

div > div > div:hover h4
{
display: inline;
}

input[value='first']
{
position: absolute;
left: 44%;
top: 57%;
margin: 2%;
}

input[value='second']
{
position: absolute;
left: 47%;
top: 57%;
margin: 2%;
}

input[value='third']
{
position: absolute;
left: 50%;
top: 57%;
margin: 2%;
}

input[value='first']:checked ~ .gallery .gallery-first-block
{
left: 0;
}

input[value='first']:checked ~ .gallery .gallery-second-block
{
left: 100%;
}

input[value='first']:checked ~ .gallery .gallery-third-block
{
left: 200%;
}

input[value='second']:checked ~ .gallery .gallery-first-block
{
left: -100%;
}

input[value='second']:checked ~ .gallery .gallery-second-block
{
left: 0;
}

input[value='second']:checked ~ .gallery .gallery-third-block
{
left: 100%;
}

input[value='third']:checked ~ .gallery .gallery-first-block
{
left: -200%;
}

input[value='third']:checked ~ .gallery .gallery-second-block
{
left: -100%;
}

input[value='third']:checked ~ .gallery .gallery-third-block
{
left: 0;
}
133 changes: 127 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,129 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
</head>
<body>
</body>
<html lang="ru">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="index.css">
<title>Hello, markup-6</title>
</head>
<body>
<input type="radio" name="slider" value="first" checked="checked">
<input type="radio" name="slider" value="second">
<input type="radio" name="slider" value="third">
<div class="gallery">
<div class="gallery-first-block">
<div id="aubergine" class="gallery-item">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

семантика

<div class="close-button">
<a href="#">X</a>
</div>
<a href="#aubergine">
<img src="aubergine.jpg" alt="aubergine">
</a>
<h4>Aubergine</h4>
</div>
<div id="tomato" class="gallery-item">
<div class="close-button">
<a href="#">X</a>
</div>
<a href="#tomato">
<img src="tomato.jpg" alt="tomato">
</a>
<h4>Tomato</h4>
</div>
<div id="apple" class="gallery-item">
<div class="close-button">
<a href="#">X</a>
</div>
<a href="#apple">
<img src="apple.png" alt="apple">
</a>
<h4>Apple</h4>
</div>
<div id="cucumber" class="gallery-item">
<div class="close-button">
<a href="#">X</a>
</div>
<a href="#cucumber">
<img src="cucumber.jpeg" alt="cucumber">
</a>
<h4>Cucumber</h4>
</div>
</div>
<div class="gallery-second-block">
<div id="corn" class="gallery-item">
<div class="close-button">
<a href="#">X</a>
</div>
<a href="#corn">
<img src="corn.jpg" alt="corn">
</a>
<h4>Corn</h4>
</div>
<div id="pear" class="gallery-item">
<div class="close-button">
<a href="#">X</a>
</div>
<a href="#pear">
<img src="pear.jpg" alt="pear">
</a>
<h4>Pear</h4>
</div>
<div id="pumpkin" class="gallery-item">
<div class="close-button">
<a href="#">X</a>
</div>
<a href="#pumpkin">
<img src="pumpkin.jpg" alt="pumpkin">
</a>
<h4>Pumpkin</h4>
</div>
<div id="pepper" class="gallery-item">
<div class="close-button">
<a href="#">X</a>
</div>
<a href="#pepper">
<img src="pepper.png" alt="pepper">
</a>
<h4>Pepper</h4>
</div>
</div>
<div class="gallery-third-block">
<div id="carrot" class="gallery-item">
<div class="close-button">
<a href="#">X</a>
</div>
<a href="#carrot">
<img src="carrot.jpg" alt="carrot">
</a>
<h4>Carrot</h4>
</div>
<div id="cabbage" class="gallery-item">
<div class="close-button">
<a href="#">X</a>
</div>
<a href="#cabbage">
<img src="cabbage.jpg" alt="cabbage">
</a>
<h4>Cabbage</h4>
</div>
<div id="mushroom" class="gallery-item">
<div class="close-button">
<a href="#">X</a>
</div>
<a href="#mushroom">
<img src="mushroom.jpg" alt="mushroom">
</a>
<h4>Garlic</h4>
</div>
<div id="potato" class="gallery-item">
<div class="close-button">
<a href="#">X</a>
</div>
<a href="#Potato">
<img src="potato.jpg" alt="potato">
</a>
<h4>Potato</h4>
</div>
</div>
</div>
</body>
</html>
Binary file added mushroom.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pear.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pepper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added potato.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pumpkin.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tomato.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.