質問編集履歴
3
htmlのコード表示と注釈を追加しました!
test
CHANGED
File without changes
|
test
CHANGED
@@ -82,9 +82,7 @@
|
|
82
82
|
|
83
83
|
htmlです
|
84
84
|
|
85
|
-
|
85
|
+
```ここに言語を入力
|
86
|
-
|
87
|
-
|
88
86
|
|
89
87
|
<body id="top">
|
90
88
|
|
@@ -167,3 +165,41 @@
|
|
167
165
|
<div class="blank3"></div>
|
168
166
|
|
169
167
|
</body>
|
168
|
+
|
169
|
+
```
|
170
|
+
|
171
|
+
書き方が悪くたびたび修正申し訳ございませんm(__)m
|
172
|
+
|
173
|
+
<div id="topimage">
|
174
|
+
|
175
|
+
</div>
|
176
|
+
|
177
|
+
のところで、画像を横幅のみいっぱいに表示させたく、CSSの
|
178
|
+
|
179
|
+
#topimage {
|
180
|
+
|
181
|
+
//overflow: hidden;
|
182
|
+
|
183
|
+
//height: 0;
|
184
|
+
|
185
|
+
width: 100%;
|
186
|
+
|
187
|
+
padding: 300px; /* calc(画像高さ ÷ 画像横幅 × 100%) */
|
188
|
+
|
189
|
+
background: url(mt.jpg) center center / cover no-repeat;
|
190
|
+
|
191
|
+
}
|
192
|
+
|
193
|
+
のところで検索しながらいろいろ試している状況です!
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
bodyの内側全てをdivで囲んで、cssでoverflow:hiddenとするやり方、
|
198
|
+
|
199
|
+
widthを100%にして、bodyのデフォルトで設定されていると思われる
|
200
|
+
|
201
|
+
marginをリセットするやり方、
|
202
|
+
|
203
|
+
それを*{margin:0:}のように全選択するやり方等試しましたが、どのような場合でも
|
204
|
+
|
205
|
+
必ず左右に隙間が出来てしまいます(´;ω;`)
|
2
文字のところは◯で置き換えたりしています 色々いじくってしまったので汚いですが(´;ω;`)よろしくお願いします!
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
1
文字のところは◯で置き換えたりしています 色々いじくってしまったので汚いですが(´;ω;`)よろしくお願いします!
test
CHANGED
File without changes
|
test
CHANGED
@@ -5,3 +5,165 @@
|
|
5
5
|
使っているブラウザはchromeです
|
6
6
|
|
7
7
|
どの高良い解決方法をご存知でしょうか?
|
8
|
+
|
9
|
+
```cssです
|
10
|
+
|
11
|
+
// Place all the styles related to the toppages controller here.
|
12
|
+
|
13
|
+
// They will automatically be included in application.css.
|
14
|
+
|
15
|
+
// You can use Sass (SCSS) here: http://sass-lang.com/
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
body {
|
20
|
+
|
21
|
+
margin: 0em;
|
22
|
+
|
23
|
+
}
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
#opa {
|
28
|
+
|
29
|
+
background: rgba(200,200,200,0.4);
|
30
|
+
|
31
|
+
}
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
.content {
|
36
|
+
|
37
|
+
background: rgba(200,200,200,0.4);
|
38
|
+
|
39
|
+
border-radius: 10px;
|
40
|
+
|
41
|
+
display: inline-block;
|
42
|
+
|
43
|
+
width: 100%;
|
44
|
+
|
45
|
+
height: 155px;
|
46
|
+
|
47
|
+
text-align: center;
|
48
|
+
|
49
|
+
}
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
#topimage {
|
56
|
+
|
57
|
+
//overflow: hidden;
|
58
|
+
|
59
|
+
//height: 0;
|
60
|
+
|
61
|
+
width: 100%;
|
62
|
+
|
63
|
+
padding: 300px; /* calc(画像高さ ÷ 画像横幅 × 100%) */
|
64
|
+
|
65
|
+
background: url(mt.jpg) center center / cover no-repeat;
|
66
|
+
|
67
|
+
}
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
html {
|
72
|
+
|
73
|
+
margin: 0em;
|
74
|
+
|
75
|
+
}
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
```
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
htmlです
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
<body id="top">
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
<div class="background-hack"></div>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<div id="topimage">
|
98
|
+
|
99
|
+
</div>
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
<div id="na"></div>
|
104
|
+
|
105
|
+
<div class="blank1"></div>
|
106
|
+
|
107
|
+
<div class="content">
|
108
|
+
|
109
|
+
<h1><font color="white">◯</font></h1>
|
110
|
+
|
111
|
+
<p><font color="white">◯</font></p>
|
112
|
+
|
113
|
+
<p class="push"><%= link_to '◯', explains_path, :style=>"color:white;" %></p>
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
<div id="comp"></div>
|
120
|
+
|
121
|
+
<div class="blank1"></div>
|
122
|
+
|
123
|
+
<div class="content">
|
124
|
+
|
125
|
+
<h1><font color="white">◯</font></h1>
|
126
|
+
|
127
|
+
<p><font color="white"><span>〇〇</span><span>〇〇</span></font></p>
|
128
|
+
|
129
|
+
<p class="push"><%= link_to '◯', companys_path, :style=>"color:white;" %></p>
|
130
|
+
|
131
|
+
</div>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
<div id="buy"></div>
|
136
|
+
|
137
|
+
<div class="blank1"></div>
|
138
|
+
|
139
|
+
<div class="content">
|
140
|
+
|
141
|
+
<h1><font color="white">〇〇</font></h1>
|
142
|
+
|
143
|
+
<p><font color="white">ページです</font></p>
|
144
|
+
|
145
|
+
<p class="push"><font color="white">◯ページへ</font></p>
|
146
|
+
|
147
|
+
</div>
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
<div id="ask"></div>
|
152
|
+
|
153
|
+
<div class="blank1"></div>
|
154
|
+
|
155
|
+
<div class="content">
|
156
|
+
|
157
|
+
<h1><font color="white">〇〇</font></h1>
|
158
|
+
|
159
|
+
<p><font color="white"><span>〇〇</span><span>〇〇</span></font></p>
|
160
|
+
|
161
|
+
<p class="push"><font color="white">〇〇</font></p>
|
162
|
+
|
163
|
+
</div>
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<div class="blank3"></div>
|
168
|
+
|
169
|
+
</body>
|