回答編集履歴
1
画像のほうを伸縮
answer
CHANGED
@@ -4,4 +4,24 @@
|
|
4
4
|
max-height: calc(50vw - 6em);
|
5
5
|
overflow: hidden;
|
6
6
|
}
|
7
|
+
```
|
8
|
+
|
9
|
+
-- 追記。画像のほうを伸縮
|
10
|
+
```CSS
|
11
|
+
article.kiji {
|
12
|
+
position: relative;
|
13
|
+
}
|
14
|
+
|
15
|
+
article.kiji::before {
|
16
|
+
content: '';
|
17
|
+
position: absolute;
|
18
|
+
left: 0;
|
19
|
+
width: 50%;
|
20
|
+
height: 100%;
|
21
|
+
/* 画像はこちらで */
|
22
|
+
background-image: url("背景画像");
|
23
|
+
background-position: left top;
|
24
|
+
background-size: cover;
|
25
|
+
background-repeat: no-repeat;
|
26
|
+
}
|
7
27
|
```
|