Skip to content

Commit 2176277

Browse files
committed
Added lesson 16
1 parent 23ef927 commit 2176277

19 files changed

+175
-0
lines changed

16_lesson/css/style.css

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
@import url("https://fonts.googleapis.com/css2?family=Nunito&display=swap");
2+
3+
/* Begin Reset */
4+
* {
5+
margin: 0;
6+
padding: 0;
7+
box-sizing: border-box;
8+
}
9+
10+
img { display: block; }
11+
/* End Reset */
12+
13+
/* Utility Classes */
14+
.nowrap {
15+
white-space: nowrap;
16+
}
17+
18+
.offscreen {
19+
position: absolute;
20+
left: -10000px;
21+
}
22+
23+
/* End Utility Classes */
24+
25+
body {
26+
font-family: "Nunito", sans-serif;
27+
min-height: 100vh;
28+
background-color: aliceblue;
29+
/* background-image: url("../img/bubbles.png"), linear-gradient(to left, steelblue, #fff);
30+
background-repeat: repeat-y, no-repeat;
31+
background-position: right center; */
32+
33+
background: repeat-y right center url("../img/bubbles.png"), no-repeat linear-gradient(to left, steelblue, #fff);
34+
background-size: 20%, auto;
35+
}
36+
37+
.container {
38+
background-color: rgb(251, 210, 156);
39+
background-image: url('../img/map-2176x1451.png');
40+
background-repeat: no-repeat;
41+
background-position: top;
42+
background-size: cover;
43+
}
44+
45+
.hero {
46+
border-bottom: 2px solid #000;
47+
padding: 20px;
48+
display: flex;
49+
justify-content: flex-start;
50+
align-items: center;
51+
gap: 30px;
52+
53+
background-color: hsla(0, 0%, 100%, 0.35);
54+
55+
}
56+
57+
.h1 {
58+
font-size: 500%;
59+
color: aliceblue;
60+
text-shadow: 2px 2px 5px #000;
61+
/* background-color: hsla(0, 0%, 0%, 0.403);
62+
padding: 0.25rem;
63+
border-radius: 10px; */
64+
}
65+
66+
.profile-pic-figure {
67+
width: 35%;
68+
}
69+
70+
.profile-pic-figure img {
71+
width: 100%;
72+
height: auto;
73+
min-width: 100px;
74+
border: 5px double gray;
75+
border-radius: 50%;
76+
}
77+
78+
.example {
79+
margin-top: 1rem;
80+
padding-left: 20px;
81+
border: 1px solid red;
82+
}
83+
84+
.example img {
85+
width: 25%;
86+
height: auto;
87+
}
88+
89+
.clip {
90+
font-weight: 800;
91+
font-size: 18rem;
92+
text-align: center;
93+
background-image: url("../img/scenic-2200x1331.png");
94+
background-size: 100%;
95+
text-transform: uppercase;
96+
-webkit-background-clip: text;
97+
background-clip: text;
98+
color: transparent;
99+
}
100+
101+

16_lesson/img/bubbles.png

21.2 KB
Loading

16_lesson/img/map-2176x1451.png

45.1 MB
Loading

16_lesson/img/pat1.png

17.5 KB
Loading

16_lesson/img/pat2-transparency.png

69.7 KB
Loading

16_lesson/img/pat2.png

67.4 KB
Loading

16_lesson/img/profile-800x800.png

958 KB
Loading

16_lesson/img/scenic-2200x1331.png

4.42 MB
Loading

16_lesson/index.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<title>CSS Images</title>
9+
<link rel="stylesheet" href="css/style.css">
10+
</head>
11+
12+
<body>
13+
<!-- <div class="container">
14+
<section class="hero">
15+
<figure class="profile-pic-figure">
16+
<img src="img/profile-800x800.png" alt="Profile Picture" title="My Profile Picture" width="800" height="800">
17+
<figcaption class="offscreen">Jane Doe</figcaption>
18+
</figure>
19+
<h1 class="h1">
20+
<span class="nowrap">Hello 👋</span>
21+
<span class="nowrap">I'm Jane</span>
22+
</h1>
23+
</section>
24+
</div> -->
25+
<!-- <section class="example">
26+
27+
<img src="img/pat1.png" alt="Pattern 1" width="200" height="200">
28+
29+
</section> -->
30+
<section>
31+
<p class="clip">Jane</p>
32+
</section>
33+
</body>
34+
35+
</html>

16_lesson_starter/css/style.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@import url("https://fonts.googleapis.com/css2?family=Nunito&display=swap");
2+
3+
* {
4+
margin: 0;
5+
padding: 0;
6+
box-sizing: border-box;
7+
}
8+
9+
body {
10+
font-family: "Nunito", sans-serif;
11+
min-height: 100vh;
12+
}
13+
14+
15+
16+
17+

16_lesson_starter/img/bubbles.png

21.2 KB
Loading
45.1 MB
Loading

16_lesson_starter/img/pat1.png

17.5 KB
Loading
69.7 KB
Loading

16_lesson_starter/img/pat2.png

67.4 KB
Loading
958 KB
Loading
4.42 MB
Loading

16_lesson_starter/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<title>CSS Images</title>
9+
<link rel="stylesheet" href="css/style.css">
10+
</head>
11+
12+
<body>
13+
14+
</body>
15+
16+
</html>

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
- 🔗 [W3C CSS Validator](https://jigsaw.w3.org/css-validator/)
4848
- 🔗 [Specificity Calculator](https://specificity.keegan.st/)
4949
- 🔗 [HTML Special Characters](https://unicode-table.com)
50+
- 🔗 [Can I Use](https://caniuse.com/)
5051

5152
### 🕹️ Learning Games
5253
- 🔗 [Flexbox Froggy](https://flexboxfroggy.com/)
@@ -68,6 +69,9 @@
6869
- 🔗 [MDN: Flexbox](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox)
6970
- 🔗 [MDN: Basic Concepts of Grid Layout](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Basic_Concepts_of_Grid_Layout)
7071
- 🔗 [MDN: Grid Template Areas](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Grid_Template_Areas)
72+
- 🔗 [MDN: CSS Images](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Images)
73+
- 🔗 [MDN: CSS Background Images](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Backgrounds_and_Borders/Resizing_background_images)
74+
- 🔗 [Chip Cullen: Content Layout Shift](https://chipcullen.com/what-width-and-height-attributes-to-use-with-responsive-images/)
7175

7276
### 📚 Typography Resources:
7377
- 🔗 [MDN: Fundamental Text and Font Styling](https://developer.mozilla.org/en-US/docs/Learn/CSS/Styling_text/Fundamentals)
@@ -120,5 +124,7 @@
120124
- 🔗 [Chapter 14 Completed Code](https://github.com/gitdagray/css_course/tree/main/14_lesson)
121125
- 🔗 [Chapter 15 Starter Code](https://github.com/gitdagray/css_course/tree/main/15_lesson_starter)
122126
- 🔗 [Chapter 15 Completed Code](https://github.com/gitdagray/css_course/tree/main/15_lesson)
127+
- 🔗 [Chapter 16 Starter Code](https://github.com/gitdagray/css_course/tree/main/16_lesson_starter)
128+
- 🔗 [Chapter 16 Completed Code](https://github.com/gitdagray/css_course/tree/main/16_lesson)
123129

124130

0 commit comments

Comments
 (0)