-
Notifications
You must be signed in to change notification settings - Fork 192
HTML i CSS: Responsywność #169
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?
Changes from all commits
fea8783
b0681f4
7314f88
6c2168a
9148388
484b429
d64386b
9667d18
95ab3e8
a1df024
9f4038b
4bdd950
1596c3a
abf608e
cdc2a70
e0a6536
92de7ae
40f6c15
45b27c8
5668f36
47117e0
a789698
ae6b7ce
54a3e48
d38e3cf
0e4c9a2
d549f23
ebd6512
3706547
033b024
df91f28
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 @@ | ||
| .vscode/settings.json |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,24 @@ | ||
| * { | ||
| margin: 0; | ||
| padding: 0; | ||
| box-sizing: border-box; | ||
| margin: 0; | ||
| padding: 0; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| .content { | ||
| background-color: #fff; | ||
| min-height: 320px; | ||
| min-width: 320px; | ||
| max-width: 600px; | ||
| text-align: justify; | ||
| background-color: #fff; | ||
| min-height: 320px; | ||
| min-width: 320px; | ||
| max-width: 600px; | ||
| text-align: justify; | ||
| } | ||
|
|
||
| .content::before { | ||
| float: left; | ||
| display: block; | ||
| content: ''; | ||
| height: 0; | ||
| border: 150px solid #dcdcdc; | ||
| border-right-color: transparent; | ||
| border-bottom-color: transparent; | ||
| } | ||
| float: left; | ||
| display: block; | ||
| content: ""; | ||
| height: 0; | ||
| border: 150px solid #dcdcdc; | ||
| border-right-color: transparent; | ||
| border-bottom-color: transparent; | ||
| shape-outside: polygon(0 0, 0% 100%, 100% 0); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,55 @@ | ||
| * { | ||
| margin: 0; | ||
| padding: 0; | ||
| box-sizing: border-box; | ||
| margin: 0; | ||
| padding: 0; | ||
| box-sizing: border-box; | ||
| } | ||
| body { | ||
| grid-template-areas: | ||
| "a" | ||
| "b" | ||
| "c"; | ||
| } | ||
| .a, | ||
| .b, | ||
| .c { | ||
| border: 3px solid transparent; | ||
| min-height: 50px; | ||
| height: 50vh; | ||
|
|
||
| .a, .b, .c { | ||
| border: 3px solid transparent; | ||
| min-height: 50px; | ||
|
|
||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| } | ||
|
|
||
| .a { | ||
| border-color: #ffffba | ||
| border-color: #ffffba; | ||
| grid-area: a; | ||
| } | ||
|
|
||
| .b { | ||
| border-color: #ffdfba; | ||
| border-color: #ffdfba; | ||
| grid-area: b; | ||
| } | ||
|
|
||
| .c { | ||
| border-color: #baffc9; | ||
| } | ||
| border-color: #baffc9; | ||
| grid-area: c; | ||
| } | ||
| body { | ||
| display: grid; | ||
| grid-template-areas: | ||
| "a" | ||
| "b" | ||
| "c"; | ||
| } | ||
|
|
||
| @media screen and (min-width: 600px) { | ||
| body { | ||
| display: grid; | ||
| grid-template-areas: | ||
| "a a" | ||
| "c b"; | ||
| max-width: 1200px; | ||
| margin: 0 auto; | ||
| } | ||
| } | ||
|
Owner
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. 👍 |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,73 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="pl"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
| <link rel="stylesheet" href="styles/global.css" /> | ||
| <link rel="stylesheet" href="styles/mobile.css" /> | ||
| <link | ||
| rel="stylesheet" | ||
| media="(min-width: 600px)" | ||
| href="styles/tablet.css" | ||
| /> | ||
| <link | ||
| rel="stylesheet" | ||
| media="(min-width: 1200px)" | ||
| href="styles/desktop.css" | ||
| /> | ||
| <title>devmentor.pl - HTML & CSS: RWD - #03</title> | ||
| </head> | ||
| <body> | ||
|
|
||
| <main class="t">T</main> | ||
| <header class="p">P</header> | ||
| <side class="v">V</side> | ||
|
|
||
| </body> | ||
| </html> | ||
| </head> | ||
| <body> | ||
| <main class="t"> | ||
| <p> | ||
| Lorem ipsum dolor sit amet consectetur, adipisicing elit. Fuga porro | ||
| voluptas suscipit voluptatibus. Corrupti dolore asperiores ex distinctio | ||
| iusto iste! Lorem ipsum dolor sit amet consectetur, adipisicing elit. | ||
| Fuga porro voluptas suscipit voluptatibus. Corrupti dolore asperiores ex | ||
| distinctio iusto iste! Lorem ipsum dolor sit amet consectetur, | ||
| adipisicing elit. Fuga porro voluptas suscipit voluptatibus. Corrupti | ||
| dolore asperiores ex distinctio iusto iste! | ||
| </p> | ||
| <p></p> | ||
| Lorem ipsum dolor sit amet consectetur, adipisicing elit. Fuga porro | ||
| voluptas suscipit voluptatibus. Corrupti dolore asperiores ex distinctio | ||
| iusto iste! Lorem ipsum dolor sit amet consectetur, adipisicing elit. Fuga | ||
| porro voluptas suscipit voluptatibus. Corrupti dolore asperiores ex | ||
| distinctio iusto iste! Lorem ipsum dolor sit amet consectetur, adipisicing | ||
| elit. Fuga porro voluptas suscipit voluptatibus. Corrupti dolore | ||
| asperiores ex distinctio iusto iste! Lorem ipsum dolor sit amet | ||
| consectetur, adipisicing elit. Fuga porro voluptas suscipit voluptatibus. | ||
| Corrupti dolore asperiores ex distinctio iusto iste! | ||
| <p> | ||
| Lorem ipsum dolor sit amet consectetur, adipisicing elit. Fuga porro | ||
| voluptas suscipit voluptatibus. Corrupti dolore asperiores ex distinctio | ||
| iusto iste! Lorem ipsum dolor sit amet consectetur, adipisicing elit. | ||
| Fuga porro voluptas suscipit voluptatibus. Corrupti dolore asperiores ex | ||
| distinctio iusto iste! Lorem ipsum dolor sit amet consectetur, | ||
| adipisicing elit. Fuga porro voluptas suscipit voluptatibus. Corrupti | ||
| dolore asperiores ex distinctio iusto iste! | ||
| </p> | ||
| </main> | ||
| <header class="p"> | ||
| <picture> | ||
| <source srcset="assets/img1200.jpg" media="(min-width: 1200px)" /> | ||
| <source srcset="assets/img600.jpg" media="(min-width: 600px)" /> | ||
| <source srcset="assets/img300.jpg" /> | ||
| <img src="assets/img.jpg" alt="Fallback image" /> | ||
|
Owner
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.
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. @devmentor-pl Nie widzę screenshota, chociaż być może wiem o co chodzi 🤓
Owner
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.
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. @devmentor-pl Ok, to było wnikiem tego, że |
||
| </picture> | ||
| </header> | ||
| <side class="v" | ||
| ><iframe | ||
| width="560" | ||
| height="315" | ||
| src="https://www.youtube.com/embed/czoEAKX9aaM?si=RWkj5jVXRHIYyqwr" | ||
| title="YouTube video player" | ||
| frameborder="0" | ||
| allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" | ||
| referrerpolicy="strict-origin-when-cross-origin" | ||
| allowfullscreen | ||
| ></iframe | ||
| ></side> | ||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| /* desktop */ | ||
| body { | ||
| max-width: 1400px; | ||
| margin: 0 auto; | ||
| display: grid; | ||
| grid-template-areas: | ||
| "p v" | ||
| "t t"; | ||
| } | ||
| .p { | ||
| grid-area: p; | ||
| } | ||
| .v { | ||
| grid-area: v; | ||
| } | ||
| .t { | ||
| grid-area: t; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,29 @@ | ||
| * { | ||
| margin: 0; | ||
| padding: 0; | ||
| box-sizing: border-box; | ||
| margin: 0; | ||
| padding: 0; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| .p, .t, .v { | ||
| border: 3px solid transparent; | ||
| min-height: 50px; | ||
| .p, | ||
| .t, | ||
| .v { | ||
| border: 3px solid transparent; | ||
| min-height: 50px; | ||
|
|
||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| } | ||
|
|
||
| .p { | ||
| border-color: #ffffba | ||
| border-color: #ff00bb; | ||
| aspect-ratio: 4/3; | ||
|
Owner
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. 👍 |
||
| } | ||
|
|
||
| .t { | ||
| border-color: #ffdfba; | ||
| border-color: #ffdfba; | ||
| } | ||
|
|
||
| .v { | ||
| border-color: #baffc9; | ||
| } | ||
| border-color: #baffc9; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| /* mobile css */ | ||
| img { | ||
| display: block; | ||
| } | ||
|
Owner
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. 👍 |
||
| picture, | ||
| picture img { | ||
| max-width: 100%; | ||
| width: 100%; | ||
| height: auto; /* Zachowuje proporcje obrazu */ | ||
| aspect-ratio: 4/3; | ||
| } | ||
| side { | ||
| display: block; | ||
| height: 0; | ||
| padding-bottom: calc(315 / 560 * 100%); | ||
| position: relative; | ||
| width: 100%; /* domyślnie */ | ||
| } | ||
| iframe { | ||
| position: absolute; | ||
| left: 0; | ||
| top: 0; | ||
| height: 100%; | ||
| width: 100%; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| /* tablet */ | ||
| body { | ||
| display: grid; | ||
| grid-template-areas: | ||
| "p t" | ||
| "v t"; | ||
| grid-template-columns: minmax(200px, 50%) 1fr; | ||
| gap: 1rem; | ||
| } | ||
| .p { | ||
| grid-area: p; | ||
| } | ||
| .v { | ||
| grid-area: v; | ||
| } | ||
| .t { | ||
| grid-area: t; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,48 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="pl"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
| <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=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" | ||
| rel="stylesheet" | ||
| /> | ||
| <link rel="stylesheet" href="styles/global.css" /> | ||
| <link rel="stylesheet" href="styles/mobile.css" /> | ||
| <link | ||
| rel="stylesheet" | ||
| media="(min-width: 1200px)" | ||
| href="styles/desktop.css" | ||
| /> | ||
| <meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
| <title>devmentor.pl - HTML & CSS: RWD - #04</title> | ||
| </head> | ||
| <body> | ||
|
|
||
| </head> | ||
| <body> | ||
| <nav> | ||
| <ul> | ||
| <li> | ||
| <a href="#">start</a> | ||
| <label for="menu-switcher"><div class="hamburger"></div></label> | ||
| <input type="checkbox" id="menu-switcher" /> | ||
| <ul class="menu"> | ||
| <li class="menu-item"> | ||
| <a href="#">start</a> | ||
| </li> | ||
| <li class="menu-item"> | ||
| <a href="#">oferta</a> | ||
|
Owner
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. Chyba na wersji desktopowej tracimy :hover (podczas wolnego przesuwania kursora) - jak to naprawić?
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. @devmentor-pl Chodzi Ci o to, że na desktopie nie da się najechać kursorem na elementy w submenu, czyli "strony internetowe" i "pozycjonowanie stron www"? Jeśli tak, to faktycznie, ale u mnie nie da się zarówno podczas wolnego przesuwania kursora jak i podczas normalnego przesuwania kursora - już to naprawiłam. Chyba, że jeszcze o coś innego chodziło?
Owner
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. TAk, teraz jest ok :) |
||
| <ul class="menu-dropdown"> | ||
| <li class="menu-item menu-subitem"> | ||
| <a href="">strony internetowe</a> | ||
| </li> | ||
| <li> | ||
| <a href="#">oferta</a> | ||
| <ul> | ||
| <li><a href="">strony internetowe</a></li> | ||
| <li><a href="">pozycjonowanie stron www</a></li> | ||
| </ul> | ||
| <li class="menu-item menu-subitem"> | ||
| <a href="">pozycjonowanie stron www</a> | ||
| </li> | ||
| <li> | ||
| <a href="#">kontakt</a> | ||
| </li> | ||
| </ul> | ||
| </ul> | ||
| </li> | ||
| <li class="menu-item"> | ||
| <a href="#">kontakt</a> | ||
| </li> | ||
| </ul> | ||
| </nav> | ||
|
|
||
| </body> | ||
| </html> | ||
| </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.
👍