-
-
Notifications
You must be signed in to change notification settings - Fork 370
Expand file tree
/
Copy pathsplit_11_by_danqi.html
More file actions
88 lines (77 loc) · 1.52 KB
/
split_11_by_danqi.html
File metadata and controls
88 lines (77 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<div class="container">
<div class="inner-container">
<div class="text-section">
<h1>Works for you, even when you aren't working</h1>
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<button>Learn more</button>
</div>
<div class="image-section">
<img src="images_and_icons/work.jpg" alt="Image description">
</div>
</div>
</div>
<style>
.container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
position: relative;
}
.inner-container {
position: relative;
width: 500px;
height: 300px;
border: 1px solid #fff;
}
.image-section {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: 1;
}
.image-section img {
width: 100%;
height: 100%;
object-fit: cover;
}
.text-section {
position: absolute;
top: 0;
bottom: 0;
right: 0;
width: 45%;
background: none;
display: flex;
flex-direction: column;
align-items: flex-start;
z-index: 2;
}
.text-section h1 {
font-size: 22px;
font-family: system-ui;
padding-right: 20px;
padding-top: 20px;
margin-bottom: 0px;
}
.text-section p {
font-size: 14px;
font-family: system-ui;
padding-right: 10px;
margin-bottom: 25px;
}
button {
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
button:hover {
background-color: #45a049;
}
</style>