質問編集履歴
4
一部記述ミスがありましたのでhtml変更と画像変更しまいした。宜しくお願いいたします。
test
CHANGED
File without changes
|
test
CHANGED
@@ -40,13 +40,21 @@
|
|
40
40
|
|
41
41
|
|
42
42
|
|
43
|
-
<a href=""><img src="img/sample.png" class="shop
|
43
|
+
<a href=""><img src="img/sample.png" class="shop logo"></a>
|
44
|
+
|
44
|
-
|
45
|
+
<a href=""><img src="img/100x279.png" class="shop logo2"></a>
|
46
|
+
|
45
|
-
|
47
|
+
<a href=""><img src="img/103x279.png" class="shop logo3"></a>
|
48
|
+
|
49
|
+
<a href=""><img src="img/103x279.png" class="shop logo4"></a>
|
50
|
+
|
51
|
+
<a href=""><img src="img/100x279.png" class="shop logo5"></a>
|
52
|
+
|
53
|
+
<a href=""><img src="img/sample.png" class="shop logo6"></a>
|
46
54
|
|
47
55
|
<img src="img/waku.png" class="waku">
|
48
56
|
|
49
|
-
|
57
|
+
|
50
58
|
|
51
59
|
</div>
|
52
60
|
|
@@ -68,6 +76,8 @@
|
|
68
76
|
|
69
77
|
```
|
70
78
|
|
79
|
+
|
80
|
+
|
71
81
|
.main{
|
72
82
|
|
73
83
|
height: 1350px;
|
@@ -100,16 +110,58 @@
|
|
100
110
|
|
101
111
|
height: 279px;
|
102
112
|
|
113
|
+
width: 103px;
|
114
|
+
|
103
115
|
}
|
104
116
|
|
105
117
|
.logo{
|
106
118
|
|
107
119
|
top: 65px;
|
108
120
|
|
121
|
+
left: 227px;
|
122
|
+
|
123
|
+
}
|
124
|
+
|
125
|
+
.logo2{
|
126
|
+
|
127
|
+
top: 344px;
|
128
|
+
|
129
|
+
left: 227px;
|
130
|
+
|
131
|
+
}
|
132
|
+
|
133
|
+
.logo3{
|
134
|
+
|
135
|
+
top: 65px;
|
136
|
+
|
137
|
+
left: 331px;
|
138
|
+
|
139
|
+
}
|
140
|
+
|
141
|
+
.logo4{
|
142
|
+
|
143
|
+
top: 623px;
|
144
|
+
|
109
145
|
left: 225px;
|
110
146
|
|
111
147
|
}
|
112
148
|
|
149
|
+
.logo5{
|
150
|
+
|
151
|
+
top:65px;
|
152
|
+
|
153
|
+
left: 435px;
|
154
|
+
|
155
|
+
}
|
156
|
+
|
157
|
+
.logo6{
|
158
|
+
|
159
|
+
top:344px;
|
160
|
+
|
161
|
+
left: 331px;
|
162
|
+
|
163
|
+
}
|
164
|
+
|
113
165
|
```
|
114
166
|
|
115
167
|
|
@@ -132,15 +184,15 @@
|
|
132
184
|
|
133
185
|
HTMLで親要素の<div class="main">に対して
|
134
186
|
|
135
|
-
img要素の 『shop
|
187
|
+
img要素の 『shop logo』 と 『waku』 をcssのposition:relativeとabsoluteで重ねて
|
136
|
-
|
188
|
+
|
137
|
-
『shop
|
189
|
+
『shop logo』 をcssで 『waku』 の左上に位置を指定しました。
|
138
190
|
|
139
191
|
|
140
192
|
|
141
193
|
しかし添付した図のように少し画面幅を変えると
|
142
194
|
|
143
|
-
『shop
|
195
|
+
『shop logo』がズレてしまいます。
|
144
196
|
|
145
197
|
|
146
198
|
|
@@ -148,9 +200,9 @@
|
|
148
200
|
|
149
201
|
幅を少し変えても
|
150
202
|
|
151
|
-
1枚目のサンプル画像のように
|
203
|
+
1枚目のサンプル画像のように『waku』に合わせて
|
152
|
-
|
204
|
+
|
153
|
-
|
205
|
+
『waku』のイメージ内に『shop logo』を画面幅を少し変えてもついていく(合わせる)にはどうしたら良いのでしょうか?
|
154
206
|
|
155
207
|
|
156
208
|
|
@@ -158,29 +210,29 @@
|
|
158
210
|
|
159
211
|
|
160
212
|
|
213
|
+
完成の理想『waku』の画像内に、
|
214
|
+
|
215
|
+
同じ縦幅の『shop logo』画像で枠内を埋めたいです。
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
161
221
|
コードはいろいろ試す前の最初の状態にしてあります。
|
162
222
|
|
163
223
|
|
164
224
|
|
165
225
|
またcssの『.shop』は
|
166
226
|
|
167
|
-
これからHTMLに『shop
|
227
|
+
これからHTMLに『class="shop logo"』と一緒の画像を複数、追加するのでまとめて指定するためのcssです。
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
228
|
+
|
229
|
+
|
230
|
+
|
173
|
-
![
|
231
|
+
![イメージ説明](fdd43f198cfe1b7c780eb4f901848705.png)
|
174
|
-
|
175
|
-
|
176
|
-
|
232
|
+
|
233
|
+
|
234
|
+
|
177
|
-
![
|
235
|
+
![イメージ説明](5d23f9ecb473b2b2e91f14fe96a524fd.png)
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
![2枚目](f68d8c0256bc950851e12e84fc29db39.png)
|
182
|
-
|
183
|
-
|
184
236
|
|
185
237
|
### 発生している問題・エラーメッセージ
|
186
238
|
|
3
ご指定いただいた、ソースコードを添付しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -114,7 +114,7 @@
|
|
114
114
|
|
115
115
|
|
116
116
|
|
117
|
-
|
117
|
+
|
118
118
|
|
119
119
|
### 前提・実現したいこと
|
120
120
|
|
2
ご指摘いただいたソースコードの追加。
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,3 +1,121 @@
|
|
1
|
+
```ここに言語を入力
|
2
|
+
|
3
|
+
コード
|
4
|
+
|
5
|
+
<!DOCTYPE html>
|
6
|
+
|
7
|
+
<html>
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
<head>
|
12
|
+
|
13
|
+
<meta charset="utf-8">
|
14
|
+
|
15
|
+
<title>sample</title>
|
16
|
+
|
17
|
+
<meta name="viewport" content="width=device-width">
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
<link rel="stylesheet" href="style1.css">
|
22
|
+
|
23
|
+
</head>
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
<body>
|
28
|
+
|
29
|
+
<header>
|
30
|
+
|
31
|
+
<h1></h1>
|
32
|
+
|
33
|
+
<p></p>
|
34
|
+
|
35
|
+
<p></p>
|
36
|
+
|
37
|
+
</header>
|
38
|
+
|
39
|
+
<div class="main">
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
<a href=""><img src="img/sample.png" class="shop-logo"></a>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
<img src="img/waku.png" class="waku">
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
</div>
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
</body>
|
56
|
+
|
57
|
+
<footer>
|
58
|
+
|
59
|
+
<h1></h1>
|
60
|
+
|
61
|
+
</footer>
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
</html>
|
66
|
+
|
67
|
+
```
|
68
|
+
|
69
|
+
```
|
70
|
+
|
71
|
+
.main{
|
72
|
+
|
73
|
+
height: 1350px;
|
74
|
+
|
75
|
+
position: relative;
|
76
|
+
|
77
|
+
}
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
.waku{
|
82
|
+
|
83
|
+
display: block;
|
84
|
+
|
85
|
+
height: 1250px;
|
86
|
+
|
87
|
+
width: auto;
|
88
|
+
|
89
|
+
margin-left: auto;
|
90
|
+
|
91
|
+
margin-right: auto;
|
92
|
+
|
93
|
+
}
|
94
|
+
|
95
|
+
.shop{
|
96
|
+
|
97
|
+
display: block;
|
98
|
+
|
99
|
+
position: absolute;
|
100
|
+
|
101
|
+
height: 279px;
|
102
|
+
|
103
|
+
}
|
104
|
+
|
105
|
+
.logo{
|
106
|
+
|
107
|
+
top: 65px;
|
108
|
+
|
109
|
+
left: 225px;
|
110
|
+
|
111
|
+
}
|
112
|
+
|
113
|
+
```
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
```
|
118
|
+
|
1
119
|
### 前提・実現したいこと
|
2
120
|
|
3
121
|
位置指定したimg要素同士を画面サイズ(幅)によるズレを無くしたいです。
|
@@ -78,119 +196,9 @@
|
|
78
196
|
|
79
197
|
|
80
198
|
|
81
|
-
|
199
|
+
|
82
|
-
|
83
|
-
|
200
|
+
|
84
|
-
|
85
|
-
|
201
|
+
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
<head>
|
90
|
-
|
91
|
-
<meta charset="utf-8">
|
92
|
-
|
93
|
-
<title>sample</title>
|
94
|
-
|
95
|
-
<meta name="viewport" content="width=device-width">
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
<link rel="stylesheet" href="style1.css">
|
100
|
-
|
101
|
-
</head>
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
<body>
|
106
|
-
|
107
|
-
<header>
|
108
|
-
|
109
|
-
<h1></h1>
|
110
|
-
|
111
|
-
<p></p>
|
112
|
-
|
113
|
-
<p></p>
|
114
|
-
|
115
|
-
</header>
|
116
|
-
|
117
|
-
<div class="main">
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
<a href=""><img src="img/sample.png" class="shop-logo"></a>
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
<img src="img/waku.png" class="waku">
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
</div>
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
</body>
|
134
|
-
|
135
|
-
<footer>
|
136
|
-
|
137
|
-
<h1></h1>
|
138
|
-
|
139
|
-
</footer>
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
</html>
|
144
|
-
|
145
|
-
```
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
```
|
150
|
-
|
151
|
-
.main{
|
152
|
-
|
153
|
-
height: 1350px;
|
154
|
-
|
155
|
-
position: relative;
|
156
|
-
|
157
|
-
}
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
.waku{
|
162
|
-
|
163
|
-
display: block;
|
164
|
-
|
165
|
-
height: 1250px;
|
166
|
-
|
167
|
-
width: auto;
|
168
|
-
|
169
|
-
margin-left: auto;
|
170
|
-
|
171
|
-
margin-right: auto;
|
172
|
-
|
173
|
-
}
|
174
|
-
|
175
|
-
.shop{
|
176
|
-
|
177
|
-
display: block;
|
178
|
-
|
179
|
-
position: absolute;
|
180
|
-
|
181
|
-
height: 279px;
|
182
|
-
|
183
|
-
}
|
184
|
-
|
185
|
-
.logo{
|
186
|
-
|
187
|
-
top: 65px;
|
188
|
-
|
189
|
-
left: 225px;
|
190
|
-
|
191
|
-
}
|
192
|
-
|
193
|
-
```
|
194
202
|
|
195
203
|
|
196
204
|
|
1
ご指定いただいた、ソースコードを添付しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -78,9 +78,117 @@
|
|
78
78
|
|
79
79
|
|
80
80
|
|
81
|
+
```
|
82
|
+
|
83
|
+
<!DOCTYPE html>
|
84
|
+
|
81
|
-
|
85
|
+
<html>
|
86
|
+
|
87
|
+
|
88
|
+
|
82
|
-
|
89
|
+
<head>
|
90
|
+
|
91
|
+
<meta charset="utf-8">
|
92
|
+
|
93
|
+
<title>sample</title>
|
94
|
+
|
95
|
+
<meta name="viewport" content="width=device-width">
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
<link rel="stylesheet" href="style1.css">
|
100
|
+
|
101
|
+
</head>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
<body>
|
106
|
+
|
107
|
+
<header>
|
108
|
+
|
109
|
+
<h1></h1>
|
110
|
+
|
111
|
+
<p></p>
|
112
|
+
|
113
|
+
<p></p>
|
114
|
+
|
115
|
+
</header>
|
116
|
+
|
117
|
+
<div class="main">
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<a href=""><img src="img/sample.png" class="shop-logo"></a>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
<img src="img/waku.png" class="waku">
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
</body>
|
134
|
+
|
135
|
+
<footer>
|
136
|
+
|
137
|
+
<h1></h1>
|
138
|
+
|
139
|
+
</footer>
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
</html>
|
144
|
+
|
145
|
+
```
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
```
|
150
|
+
|
83
|
-
|
151
|
+
.main{
|
152
|
+
|
153
|
+
height: 1350px;
|
154
|
+
|
155
|
+
position: relative;
|
156
|
+
|
157
|
+
}
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
.waku{
|
162
|
+
|
163
|
+
display: block;
|
164
|
+
|
165
|
+
height: 1250px;
|
166
|
+
|
167
|
+
width: auto;
|
168
|
+
|
169
|
+
margin-left: auto;
|
170
|
+
|
171
|
+
margin-right: auto;
|
172
|
+
|
173
|
+
}
|
174
|
+
|
175
|
+
.shop{
|
176
|
+
|
177
|
+
display: block;
|
178
|
+
|
179
|
+
position: absolute;
|
180
|
+
|
181
|
+
height: 279px;
|
182
|
+
|
183
|
+
}
|
184
|
+
|
185
|
+
.logo{
|
186
|
+
|
187
|
+
top: 65px;
|
188
|
+
|
189
|
+
left: 225px;
|
190
|
+
|
191
|
+
}
|
84
192
|
|
85
193
|
```
|
86
194
|
|