- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<title>Контакты, шаг 3</title>
<link rel="stylesheet" href="setting.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="contacts">
<div class="title">Наш адрес</div>
<div class="item">
<div class="icon"></div>
Россия, Санкт-Петербург,<br>
Невский пр., дом 1
</div>
<div class="item">
<div class="icon"></div>
+7 (921) 555-33-22
</div>
<div class="item">
<div class="icon"></div>
<a href="mailto:mail@htmlacademy.ru">mail@htmlacademy.ru</a>
</div>
</div>
</body>
</html>
CSS
body {
font-size: 14px;
font-family: "PT Sans", sans-serif;
color: #777777;
}
.contacts {
width: 250px;
margin: 0 auto;
margin-top: 80px;
}
.contacts .title {
margin-bottom: 20px;
font-weight: bold;
font-size: 20px;
color: #7f8c8c;
}
.contacts .item {
position: relative;
margin-bottom: 10px;
padding-left: 30px;
}
.contacts .icon {
position: absolute;
top: 3px;
left: 0;
width: 22px;
height: 32px;
background: url("contacts.png") no-repeat 0 0;
}
.contacts .icon-location {
}
.contacts .icon-phone {
}
.contacts .icon-email {
}
.contacts a {
}
ЗадачиВыполнено
- Добавьте первой иконке класс
icon-location
, второйicon-phone
, третьейicon-email
. - Задайте положение фона
0 0
дляicon-location
,-30px 0
дляicon-phone
,-60px 0
дляicon-email
. - Задайте цвет ссылок
#e2534b
.