-
Notifications
You must be signed in to change notification settings - Fork 5k
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
add task solution #5819
base: master
Are you sure you want to change the base?
add task solution #5819
Changes from all commits
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 |
---|---|---|
|
@@ -4,19 +4,108 @@ | |
<meta charset="UTF-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" | ||
content="width=device-width, | ||
user-scalable=no, | ||
initial-scale=1.0, | ||
maximum-scale=1.0, | ||
minimum-scale=1.0" | ||
/> | ||
<meta | ||
http-equiv="X-UA-Compatible" | ||
content="ie=edge" | ||
/> | ||
<title>Moyo header</title> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="./style.css" | ||
/> | ||
</head> | ||
<body> | ||
<h1>Moyo header</h1> | ||
<header class="header"> | ||
<a | ||
href="#" | ||
class="logo" | ||
> | ||
<img | ||
src="images/logo.png" | ||
alt="moyo_logo" | ||
class="img" | ||
/> | ||
</a> | ||
|
||
<nav class="nav"> | ||
<ul class="nav__list"> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
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. The |
||
class="nav__link is-active" | ||
> | ||
Apple | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
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. The |
||
class="nav__link" | ||
> | ||
Samsung | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
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. The |
||
class="nav__link" | ||
> | ||
Smartphones | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
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. The |
||
class="nav__link" | ||
data-qa="hover" | ||
> | ||
Laptops & Computers | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
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. The |
||
class="nav__link" | ||
> | ||
Gadgets | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
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. The |
||
class="nav__link" | ||
> | ||
Tablets | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
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. The |
||
class="nav__link" | ||
> | ||
Photo | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
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. The |
||
class="nav__link" | ||
> | ||
Video | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
</header> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,88 @@ | ||
:root { | ||
--blue-color: #00acdc; | ||
} | ||
|
||
html { | ||
font-family: Roboto, sans-serif; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
background-color: rgb(207, 201, 201); | ||
} | ||
|
||
.header { | ||
background-color: #fff; | ||
padding: 0 50px; | ||
display: flex; | ||
flex-wrap: wrap; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
|
||
.nav { | ||
max-width: 1000px; | ||
box-sizing: border-box; | ||
display: flex; | ||
align-items: center; | ||
justify-content: flex-start; | ||
} | ||
|
||
.nav__list { | ||
display: flex; | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
width: 100%; | ||
flex-wrap: nowrap; | ||
} | ||
|
||
.nav__item { | ||
margin-right: 20px; | ||
flex-shrink: 1; | ||
} | ||
|
||
.nav__item:last-child { | ||
margin-right: 0; | ||
} | ||
|
||
.nav__link { | ||
text-decoration: none; | ||
font-size: 12px; | ||
font-weight: 500; | ||
color: black; | ||
text-transform: uppercase; | ||
display: block; | ||
height: 60px; | ||
line-height: 60px; | ||
position: relative; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
|
||
.nav__link:hover { | ||
color: var(--blue-color); | ||
} | ||
|
||
.nav__link.is-active { | ||
color: var(--blue-color); | ||
} | ||
|
||
.nav__link.is-active::after { | ||
content: ''; | ||
position: absolute; | ||
bottom: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 4px; | ||
background-color: var(--blue-color); | ||
border-radius: 8px; | ||
} | ||
|
||
.img { | ||
margin-top: 1px; | ||
max-width: 40px; | ||
max-height: 40px; | ||
flex-shrink: 0; | ||
} |
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.
The
href="#"
attribute in the anchor tag is a placeholder. Ensure to replace it with actual URLs or routes if this is not intended for a single-page application.