質問編集履歴
1
ソースコードの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,4 +1,159 @@
|
|
1
|
+
```html
|
2
|
+
<!DOCTYPE html>
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
<title></title>
|
8
|
+
<link rel="stylesheet" href="1.css">
|
1
|
-
|
9
|
+
<link rel="stylesheet" href="sumaho.css">
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
<header>
|
13
|
+
|
14
|
+
</header>
|
2
15
|
|
16
|
+
<div class="lesson-wrapper">
|
17
|
+
|
18
|
+
|
19
|
+
<div class="lessons">
|
20
|
+
|
21
|
+
<div class="lesson">
|
22
|
+
<div class="category 1">
|
23
|
+
<h1></h1>
|
24
|
+
<p class="text">
|
25
|
+
|
26
|
+
</p>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="icon">
|
30
|
+
<div class="icon 1">
|
31
|
+
<img src=".jpg">
|
32
|
+
|
33
|
+
</div></div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
<div class="lesson">
|
39
|
+
<div class="category 2">
|
40
|
+
<h1></h1>
|
41
|
+
<p class="text">
|
42
|
+
|
43
|
+
</p>
|
44
|
+
</div>
|
45
|
+
<div class="icon">
|
46
|
+
<div class="icon 2">
|
47
|
+
<img src="S__3022854.jpg">
|
48
|
+
|
49
|
+
</div></div>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
|
53
|
+
<div class="clear"></div>
|
54
|
+
</div>
|
55
|
+
|
56
|
+
</div>
|
57
|
+
|
58
|
+
css
|
59
|
+
|
60
|
+
body {
|
61
|
+
margin: 0;
|
62
|
+
font-family: "Hiragino Kaku Gothic ProN";
|
63
|
+
height:100%;
|
64
|
+
}
|
65
|
+
|
66
|
+
html{height:100;}
|
67
|
+
|
68
|
+
a {
|
69
|
+
text-decoration: none;
|
70
|
+
}
|
71
|
+
|
72
|
+
*{
|
73
|
+
box-sizing:border-box;
|
74
|
+
}
|
75
|
+
|
76
|
+
.clear{
|
77
|
+
clear: left;
|
78
|
+
}
|
79
|
+
|
80
|
+
.container {
|
81
|
+
width: 100%;
|
82
|
+
padding: 0 15px;
|
83
|
+
margin: 0 auto;
|
84
|
+
}
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
.lesson-wrapper {
|
89
|
+
|
90
|
+
height: 100%;
|
91
|
+
padding-bottom: 80px;
|
92
|
+
background-color: black;
|
93
|
+
|
94
|
+
margin: 0 auto;
|
95
|
+
|
96
|
+
}
|
97
|
+
|
98
|
+
.lessons{height: 100%;}
|
99
|
+
|
100
|
+
.lesson {
|
101
|
+
|
102
|
+
|
103
|
+
width: 100%;
|
104
|
+
height: 25%;
|
105
|
+
background-color: orange;
|
106
|
+
margin-bottom: 20px;
|
107
|
+
margin-top: 20px;
|
108
|
+
|
109
|
+
|
110
|
+
}
|
111
|
+
|
112
|
+
.lesson h1 {
|
113
|
+
opacity: 0.7;
|
114
|
+
font-size: 100px;
|
115
|
+
letter-spacing: 5px;
|
116
|
+
background-color: yellow;
|
117
|
+
margin-top: 0;
|
118
|
+
}
|
119
|
+
|
120
|
+
|
121
|
+
.text{
|
122
|
+
font-size: 10px;
|
123
|
+
display: inline-block;
|
124
|
+
}
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
.category{
|
129
|
+
background-color: green;
|
130
|
+
display: inline-block;
|
131
|
+
height: 50%;
|
132
|
+
|
133
|
+
vertical-align: top;
|
134
|
+
|
135
|
+
}
|
136
|
+
|
137
|
+
|
138
|
+
.icon {
|
139
|
+
position: relative;
|
140
|
+
width: 500px;
|
141
|
+
background-color: blue;
|
142
|
+
display: inline-block;
|
143
|
+
float: right;
|
144
|
+
vertical-align: top;
|
145
|
+
}
|
146
|
+
|
147
|
+
|
148
|
+
.icon img {
|
149
|
+
position: absolute;
|
150
|
+
|
151
|
+
width: 400px;
|
152
|
+
background-color: green;
|
153
|
+
color: white;
|
154
|
+
}
|
155
|
+
```**ボールドテキスト**### 前提・実現したいこと
|
156
|
+
|
3
157
|
写真のような構造にしたいのですが、div⑤がdiv③をはみ出してしまいます。また、スマホ画面にしたときは右のように③の中で④の下に⑤という形にしたいのですが、⑤が③をはみ出して2つ目の③と重なってしまいます。
|
4
|
-
どのようにcssを組めばよいのでしょうか?
|
158
|
+
どのようにcssを組めばよいのでしょうか?
|
159
|
+
自分でも数日間ずっと調べたり検証したりしていますが初心者にはもう限界なので助けていただきたいです。
|