-
Notifications
You must be signed in to change notification settings - Fork 62
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
Лебедев Никита #33
base: master
Are you sure you want to change the base?
Лебедев Никита #33
Changes from 2 commits
7bee796
551316e
9b7185a
998da4b
12737e2
70f3528
91b55b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
.card | ||
{ | ||
width: 350px; | ||
display: inline-block; | ||
vertical-align: top; | ||
margin-right: 12px; | ||
margin-bottom: 10px; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. А вот от пустых строчек лучше избавиться |
||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | ||
} | ||
|
||
.card:hover | ||
{ | ||
box-shadow: 1px 4px 8px 0 rgba(0,0,0,.3), 0 6px 20px 0 rgba(0,0,0,.29); | ||
transition: all 400ms ease-out; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
} | ||
|
||
.card-list | ||
{ | ||
width: 100%; | ||
min-width: 360px; | ||
text-align: justify; | ||
} | ||
|
||
.info, | ||
.description | ||
{ | ||
font-size: 16px; | ||
text-align: left; | ||
padding: 5px; | ||
padding-top: 0; | ||
} | ||
|
||
.link | ||
{ | ||
font-size: 1.5em; | ||
display: block; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Делать ссылки блочными плохо, потому что появляются пустые места, которые при этом являются ссылками |
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :( |
||
overflow: hidden; | ||
white-space: nowrap; | ||
text-overflow: ellipsis; | ||
} | ||
|
||
.link:hover | ||
{ | ||
text-shadow: 1px 1px 5px rgba(0, 0, 238, .5); | ||
} | ||
|
||
.category | ||
{ | ||
font-size: .8em; | ||
color: #000; | ||
} | ||
|
||
.category a | ||
{ | ||
color: inherit; | ||
opacity: .7; | ||
} | ||
|
||
.category a:hover | ||
{ | ||
opacity: 1; | ||
} | ||
|
||
.goodness | ||
{ | ||
font-size: 1.5em; | ||
} | ||
|
||
.current-price | ||
{ | ||
color: #a52a2a; | ||
font-size: 1.5em; | ||
margin-right: 4px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Магические 4 пикселя :) |
||
} | ||
|
||
.previous-price | ||
{ | ||
color: #919192; | ||
font-size: 1.1em; | ||
text-decoration: line-through; | ||
} | ||
|
||
.photo | ||
{ | ||
display: block; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Зачем? |
||
filter: grayscale(.4) brightness(.8); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Очень здорово 👍 |
||
} | ||
|
||
.photo:hover | ||
{ | ||
filter: grayscale(0) brightness(1); | ||
transition: all 400ms ease-out; | ||
} | ||
|
||
.fake-checkbox | ||
{ | ||
display: none; | ||
} | ||
|
||
.fake-checkbox:checked ~ .card | ||
{ | ||
display: block; | ||
width: 100%; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :( |
||
text-align: left; | ||
} | ||
|
||
.fake-checkbox:checked ~ .card > .photo, | ||
.fake-checkbox:checked ~ .card > .info, | ||
.fake-checkbox:checked ~ .card > .description | ||
{ | ||
display: inline-block; | ||
vertical-align: top; | ||
} | ||
|
||
.fake-checkbox:checked ~ .card > .photo | ||
{ | ||
width: 19%; | ||
} | ||
|
||
.fake-checkbox:checked ~ .card > .info | ||
{ | ||
width: 29%; | ||
} | ||
|
||
.fake-checkbox:checked ~ .card > .description | ||
{ | ||
width: 49%; | ||
} | ||
|
||
.fake-button | ||
{ | ||
display: block; | ||
padding: 2px 6px; | ||
margin: 10px 0; | ||
width: 250px; | ||
text-align: center; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :( |
||
-webkit-user-select: none; | ||
-moz-user-select: none; | ||
-ms-user-select: none; | ||
user-select: none; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :( |
||
-webkit-appearance: button; | ||
-moz-appearance: button; | ||
/* edge fallback */ | ||
background: #ddd; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,203 @@ | ||
<!DOCTYPE html> | ||
<html lang="ru"> | ||
|
||
<head> | ||
<title>Мяндекс.Муррркет</title> | ||
<meta charset="utf-8"> | ||
<link rel="stylesheet" href="index.css"> | ||
</head> | ||
|
||
<body> | ||
<label class="fake-button" for="view-switcher">Переключить режим отображения</label> | ||
<main class="card-list"> | ||
<input class="fake-checkbox" type="checkbox" name="view-switcher" id="view-switcher"> | ||
<div class="card"> | ||
<img class="photo" src="images/cat1.jpeg" alt="Мурзик"> | ||
<div class="info"> | ||
<a class="link" href="cat-1">Мурзик</a> | ||
<div class="category"> | ||
<a href="category-1">Мальчики</a> - <a href="category-2">Короткошерстные</a> | ||
</div> | ||
<div class="goodness"> | ||
<span>★</span><span>★</span><span>★</span><span>★</span><span>☆</span> | ||
</div> | ||
<div class="price"> | ||
<span class="current-price">1000₽</span> | ||
</div> | ||
</div> | ||
<div class="description">Ленивый домашний кот, 4 месяца, приучен к лотку. | ||
Питается сухим кормом.</div> | ||
</div> | ||
<!-- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. В чём сакральных смысл этих пустых комментариев? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Они нужны, чтобы не было промежутков между inline-block элементами |
||
--> | ||
<div class="card"> | ||
<img class="photo" src="images/cat2.jpeg" alt="Дуся"> | ||
<div class="info"> | ||
<a class="link" href="cat-2">Дуся</a> | ||
<div class="category"> | ||
<a href="category-1">Девочки</a> - <a href="category-2">Короткошерстные</a> | ||
</div> | ||
<div class="goodness"> | ||
<span>★</span><span>★</span><span>★</span><span>☆</span><span>☆</span> | ||
</div> | ||
<div class="price"> | ||
<span class="current-price">1200₽</span><span class="previous-price">1400₽</span> | ||
</div> | ||
</div> | ||
<div class="description">Привередливая кошечка, 6 месяцев, приучена к лотку и когтеточке.</div> | ||
</div> | ||
<!-- | ||
--> | ||
<div class="card"> | ||
<img class="photo" src="images/cat3.jpeg" alt="Китти"> | ||
<div class="info"> | ||
<a class="link" href="cat-3">Китти</a> | ||
<div class="category"> | ||
<a href="category-1">Девочки</a> - <a href="category-2">Короткошерстные</a> | ||
</div> | ||
<div class="goodness"> | ||
<span>★</span><span>★</span><span>★</span><span>★</span><span>★</span> | ||
</div> | ||
<div class="price"> | ||
<span class="current-price">1300₽</span><span class="previous-price">1800₽</span> | ||
</div> | ||
</div> | ||
<div class="description">Веселая киса, очень жизнерадостная, 5 месяцев. | ||
Подойдет для ловли мышей.</div> | ||
</div> | ||
<!-- | ||
--> | ||
<div class="card"> | ||
<img class="photo" src="images/cat4.jpg" alt="Масяня"> | ||
<div class="info"> | ||
<a class="link" href="cat-4">Масяня</a> | ||
<div class="category"> | ||
<a href="category-1">Девочки</a> - <a href="category-2">Длинношерстные</a> | ||
</div> | ||
<div class="goodness"> | ||
<span>★</span><span>★</span><span>★</span><span>★</span><span>★</span> | ||
</div> | ||
<div class="price"> | ||
<span class="current-price">2100₽</span> | ||
</div> | ||
</div> | ||
<div class="description">Молодая кошечка, привита, 2 месяца. От титулованных родителей.</div> | ||
</div> | ||
<!-- | ||
--> | ||
<div class="card"> | ||
<img class="photo" src="images/cat5.jpg" alt="Барон"> | ||
<div class="info"> | ||
<a class="link" href="cat-5">Барон</a> | ||
<div class="category"> | ||
<a href="category-1">Мальчики</a> - <a href="category-2">Короткошерстные</a> | ||
</div> | ||
<div class="goodness"> | ||
<span>★</span><span>★</span><span>★</span><span>★</span><span>☆</span> | ||
</div> | ||
<div class="price"> | ||
<span class="current-price">2300₽</span> | ||
</div> | ||
</div> | ||
<div class="description">Воспитанный домашний кот, 4 месяца. Дрессированный (знает команды "место" | ||
и "лежать").</div> | ||
</div> | ||
<!-- | ||
--> | ||
<div class="card"> | ||
<img class="photo" src="images/cat6.jpg" alt="Буся"> | ||
<div class="info"> | ||
<a class="link" href="cat-6">Буся</a> | ||
<div class="category"> | ||
<a href="category-1">Девочки</a> - <a href="category-2">Короткошерстные</a> | ||
</div> | ||
<div class="goodness"> | ||
<span>★</span><span>★</span><span>★</span><span>★</span><span>☆</span> | ||
</div> | ||
<div class="price"> | ||
<span class="current-price">1500₽</span><span class="previous-price">1700₽</span> | ||
</div> | ||
</div> | ||
<div class="description">Привита, приучена к лотку и когтеточке, 2 месяца. Любит полакомиться | ||
рыбой и огурцами.</div> | ||
</div> | ||
<!-- | ||
--> | ||
<div class="card"> | ||
<img class="photo" src="images/cat7.jpeg" alt="Марсик"> | ||
<div class="info"> | ||
<a class="link" href="cat-7">Марсик</a> | ||
<div class="category"> | ||
<a href="category-1">Мальчики</a> - <a href="category-2">Длинношерстные</a> | ||
</div> | ||
<div class="goodness"> | ||
<span>★</span><span>★</span><span>★</span><span>★</span><span>★</span> | ||
</div> | ||
<div class="price"> | ||
<span class="current-price">1800₽</span><span class="previous-price">2000₽</span> | ||
</div> | ||
</div> | ||
<div class="description">Жизнерадостный котенок, 2 месяца. Породистый, от титулованных | ||
родителей.</div> | ||
</div> | ||
<!-- | ||
--> | ||
<div class="card"> | ||
<img class="photo" src="images/cat8.jpg" alt="Пусик"> | ||
<div class="info"> | ||
<a class="link" href="cat-8">Пусик</a> | ||
<div class="category"> | ||
<a href="category-1">Мальчики</a> - <a href="category-2">Короткошерстные</a> | ||
</div> | ||
<div class="goodness"> | ||
<span>★</span><span>★</span><span>★</span><span>☆</span><span>☆</span> | ||
</div> | ||
<div class="price"> | ||
<span class="current-price">1000₽</span> | ||
</div> | ||
</div> | ||
<div class="description">Своенравный котенок, кушает только вискас, 3 месяца. Приучен к | ||
когтеточке.</div> | ||
</div> | ||
<!-- | ||
--> | ||
<div class="card"> | ||
<img class="photo" src="images/cat9.jpeg" alt="Лизун"> | ||
<div class="info"> | ||
<a class="link" href="cat-9">Лизун</a> | ||
<div class="category"> | ||
<a href="category-1">Мальчики</a> - <a href="category-2">Короткошерстные</a> | ||
</div> | ||
<div class="goodness"> | ||
<span>★</span><span>★</span><span>★</span><span>★</span><span>★</span> | ||
</div> | ||
<div class="price"> | ||
<span class="current-price">1500₽</span> | ||
</div> | ||
</div> | ||
<div class="description">Дружелюбный кот, 4 месяца. Любит общаться с детьми и играть с другими | ||
котиками.</div> | ||
</div> | ||
<!-- | ||
--> | ||
<div class="card"> | ||
<img class="photo" src="images/cat10.jpg" alt="Малыш"> | ||
<div class="info"> | ||
<a class="link" href="cat-10">Малыш</a> | ||
<div class="category"> | ||
<a href="category-1">Мальчики</a> - <a href="category-2">Короткошерстные</a> | ||
</div> | ||
<div class="goodness"> | ||
<span>★</span><span>★</span><span>★</span><span>☆</span><span>☆</span> | ||
</div> | ||
<div class="price"> | ||
<span class="current-price">800₽</span><span class="previous-price">900₽</span> | ||
</div> | ||
</div> | ||
<div class="description">Дворовый котенок ищет хозяев! Прошел подготовку в приемнике, привит. | ||
Аккуратный и чистоплотный, 5 месяцев.</div> | ||
</div> | ||
</main> | ||
</body> | ||
|
||
</html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно записать кратко, но не обязательно