-
Notifications
You must be signed in to change notification settings - Fork 6.2k
alteração html e css #7481
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
base: master
Are you sure you want to change the base?
alteração html e css #7481
Changes from 1 commit
062bcdd
e8e07ae
181cd5f
19e4afd
eb82014
f19e658
bc856fc
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 |
|---|---|---|
| @@ -1,22 +1,61 @@ | ||
| <!doctype html> | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <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" | ||
| /> | ||
| <meta | ||
| http-equiv="X-UA-Compatible" | ||
| content="ie=edge" | ||
| content="width=device-width, initial-scale=1.0" | ||
| /> | ||
| <meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
| <title>Moyo header</title> | ||
| <link | ||
| rel="stylesheet" | ||
| href="./style.css" | ||
| /> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com"> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
| <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet"> | ||
| <link rel="stylesheet" href="./style.css"/> | ||
| </head> | ||
| <body> | ||
| <h1>Moyo header</h1> | ||
| <header class="header"> | ||
| <a href="#home" class="logo"> | ||
| <img | ||
| src="/src/images/logo.png" | ||
|
||
| alt="Moyo online store logo" | ||
| /> | ||
| </a> | ||
| <nav class="nav"> | ||
| <ul class="nav_list"> | ||
| <li class="nav_item"> | ||
| <a href="#" class="nav_link">Apple</a> | ||
| </li> | ||
| <li class="nav_item"> | ||
| <a href="#" class="nav_link">Samsung</a> | ||
| </li> | ||
| <li class="nav_item"> | ||
| <a href="#" class="nav_link">Smartphones</a> | ||
| </li> | ||
| <li class="nav_item"> | ||
| <a | ||
| href="#" | ||
|
Comment on lines
+71
to
+72
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. According to the Figma mockup, the "Smartphones" link should be the active one. To match the design perfectly, please move the |
||
| class="nav_link is-active" | ||
| aria-current="page" | ||
| data-qa="hover" | ||
| > | ||
| Laptops & computers | ||
| </a> | ||
| </li> | ||
| <li class="nav_item"> | ||
| <a href="#" class="nav_link">Gadgets</a> | ||
| </li> | ||
| <li class="nav_item"> | ||
| <a href="#" class="nav_link">Tablets</a> | ||
| </li> | ||
| <li class="nav_item"> | ||
| <a href="#" class="nav_link">Photos</a> | ||
| </li> | ||
| <li class="nav_item"> | ||
| <a href="#" class="nav_link">Video</a> | ||
| </li> | ||
| </ul> | ||
| </nav> | ||
| </header> | ||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,83 @@ | ||
| :root { | ||
| --blue: #00acdc; | ||
| --nav-height: 56px; | ||
| } | ||
| body { | ||
| margin: 0; | ||
| font-family: 'Roboto', Arial, sans-serif; | ||
| background-color: rgb(201, 204, 204); | ||
| } | ||
|
Comment on lines
6
to
+10
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 task requires resetting browser default margins. The |
||
| .header { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| font-weight: 500; | ||
| padding:0 40px; | ||
| background-color: #fff; | ||
| } | ||
| .logo img { | ||
|
||
| display: block; | ||
| width: 40px; | ||
| height: 40px; | ||
| src: url(images/logo.png); | ||
|
||
| } | ||
| .nav_list { | ||
| display: flex; | ||
| list-style: none; | ||
|
Comment on lines
+28
to
+30
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
Author
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. ok corrigido |
||
| } | ||
|
|
||
| .nav_item + .nav_item { | ||
| margin-left: 24px; | ||
| } | ||
|
|
||
| .nav_link { | ||
| text-transform: uppercase; | ||
| display: inline-flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| position: relative; | ||
| text-decoration: none; | ||
| cursor: pointer; | ||
| height: var(--nav-height); | ||
| color: #000; | ||
| font-size: 14px; | ||
| font-weight: 500; | ||
| transition: color 0.3s; | ||
| } | ||
|
|
||
| .nav_link:hover { | ||
| color: var(--blue); | ||
| } | ||
| .nav_link.is-active { | ||
| position: relative; | ||
|
||
| color: var(--blue); | ||
| } | ||
| .nav_link::after { | ||
| content: ''; | ||
| position: absolute; | ||
| width: 100%; | ||
| left: 50%; | ||
| bottom: 2px; | ||
| height: 4px; | ||
| background-color: var(--blue); | ||
| border-radius: 8px; | ||
| opacity: 0; | ||
| transform-origin: center; | ||
| transition: opacity 0.2s ease, transform 0.2s ease; | ||
| transform: translateX(-50%) scaleX(0); | ||
| } | ||
| .nav_link:focus-visible{ | ||
| color: var(--blue); | ||
| } | ||
| .nav_link:focus-visible::after{ | ||
| transform: translateX(-50%) scaleX(1); | ||
| opacity: 1; | ||
| } | ||
| .nav_link:hover::after { | ||
| transform: translateX(-50%) scaleX(1); | ||
| color: var(--blue); | ||
|
||
| opacity: 1; | ||
| } | ||
| .nav_link.is-active::after { | ||
| transform: translateX(-50%) scaleX(1); | ||
| opacity: 1; | ||
| } | ||
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.
This line exceeds the 80-character limit specified in the code style guidelines. When an element has long attributes, it's best to place each attribute on a new line to maintain readability.