質問編集履歴

4

文章の修正

2019/02/19 07:25

投稿

takopo
takopo

スコア484

test CHANGED
File without changes
test CHANGED
@@ -146,7 +146,7 @@
146
146
 
147
147
 
148
148
 
149
- PC用の画像を使わずにこのような表現にはどうすれば良いかというのが質問内容になります。
149
+ PC用の画像を使わずにこのような表現をするにはどうすれば良いかというのが質問内容になります。
150
150
 
151
151
  ブラウザはchromeとfirefoxで確認しました。
152
152
 

3

質問文にソースを追記しました

2019/02/19 07:25

投稿

takopo
takopo

スコア484

test CHANGED
File without changes
test CHANGED
@@ -20,7 +20,131 @@
20
20
 
21
21
 
22
22
 
23
- サンプルイメージを作成しました。 → [こちら](https://thimbleprojects.org/takopo/639745/)
23
+
24
+
25
+ [サンプルイメージはこちら](https://thimbleprojects.org/takopo/639745/)
26
+
27
+ コードは下記になります。
28
+
29
+ ```html
30
+
31
+ <!DOCTYPE html>
32
+
33
+ <html>
34
+
35
+ <head>
36
+
37
+ <meta charset="utf-8">
38
+
39
+ <meta name="viewport" content="width=device-width, initial-scale=1">
40
+
41
+ <title>サンプル</title>
42
+
43
+ <link rel="stylesheet" href="style.css">
44
+
45
+ </head>
46
+
47
+ <body>
48
+
49
+
50
+
51
+ <div class="bg">
52
+
53
+ <div class="content">
54
+
55
+ <p class="txt">テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
56
+
57
+ </div>
58
+
59
+ </div>
60
+
61
+
62
+
63
+ </body>
64
+
65
+ </html>
66
+
67
+
68
+
69
+ ```
70
+
71
+ ```css
72
+
73
+ @media screen and (max-width: 767px) {
74
+
75
+ .bg {
76
+
77
+ padding-bottom: 55vw;
78
+
79
+ /* この写真だけ使いたい */
80
+
81
+ background: url(bg.png) center bottom /100% no-repeat;
82
+
83
+ }
84
+
85
+ }
86
+
87
+
88
+
89
+ @media screen and (min-width: 768px) {
90
+
91
+ .bg {
92
+
93
+ /* 透明部分があるPC用画像(これを使いたくない) */
94
+
95
+ background: url(bg2.png) center top /100% no-repeat;
96
+
97
+ }
98
+
99
+ }
100
+
101
+
102
+
103
+ @media screen and (min-width: 768px) {
104
+
105
+ .content {
106
+
107
+ width: 720px;
108
+
109
+ margin-right: auto;
110
+
111
+ margin-left: auto;
112
+
113
+ }
114
+
115
+ }
116
+
117
+
118
+
119
+ @media screen and (min-width: 992px) {
120
+
121
+ .content {
122
+
123
+ width: 940px;
124
+
125
+ }
126
+
127
+ }
128
+
129
+
130
+
131
+ @media screen and (min-width: 768px) {
132
+
133
+ .txt {
134
+
135
+ width: 48%;
136
+
137
+ }
138
+
139
+ }
140
+
141
+ ```
142
+
143
+
144
+
145
+
146
+
147
+
24
148
 
25
149
  PC用の画像を使わずにこのような表現にはどうすれば良いかというのが質問内容になります。
26
150
 

2

サンプルイメージを作成しました

2019/02/19 07:19

投稿

takopo
takopo

スコア484

test CHANGED
File without changes
test CHANGED
@@ -20,6 +20,14 @@
20
20
 
21
21
 
22
22
 
23
+ サンプルイメージを作成しました。 → [こちら](https://thimbleprojects.org/takopo/639745/)
24
+
25
+ PC用の画像を使わずにこのような表現にはどうすれば良いかというのが質問内容になります。
26
+
27
+ ブラウザはchromeとfirefoxで確認しました。
28
+
29
+
30
+
23
31
  もしどなたか良い方法をご存知の方がいらっしゃいましたら、ご教授いただけますと助かります。
24
32
 
25
33
  よろしくお願いいたします。

1

レスポンシブWebデザインのタグを追加しました

2019/02/19 07:09

投稿

takopo
takopo

スコア484

test CHANGED
File without changes
test CHANGED
File without changes