-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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 2 commits
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,62 @@ | ||
| <!doctype html> | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <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="#" class="logo"> | ||
| <img class="img" | ||
| src="images/logo.png" | ||
| alt="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,82 @@ | ||
| :root { | ||
| --blue: #00acdc; | ||
| --nav-height: 56px; | ||
| } | ||
| body { | ||
| margin: 0; | ||
| font-family: 'Roboto', Arial, sans-serif; | ||
| background-color: rgb(201, 204, 204); | ||
| } | ||
| .header { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| font-weight: 500; | ||
| padding:0 40px; | ||
| background-color: #fff; | ||
| } | ||
| .img { | ||
| display: block; | ||
| width: 40px; | ||
| height: 40px; | ||
| } | ||
| .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); | ||
| 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.
Class names should be meaningful and not replicate tag names. A class like
logo__imagewould be more descriptive and align better with the BEM-like naming convention you're using for navigation elements. This also relates to the checklist item 'Class names represent the meaning of the content (not the styles or tag names)'.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.
ok corrigido