回答編集履歴
1
情報の追加。
answer
CHANGED
@@ -4,4 +4,22 @@
|
|
4
4
|
.picture {
|
5
5
|
overflow: hidden;
|
6
6
|
}
|
7
|
-
```**動くサンプル:**[https://jsfiddle.net/qwc4p9Ln/](https://jsfiddle.net/qwc4p9Ln/)
|
7
|
+
```**動くサンプル:**[https://jsfiddle.net/qwc4p9Ln/](https://jsfiddle.net/qwc4p9Ln/)
|
8
|
+
|
9
|
+
|
10
|
+
---
|
11
|
+
|
12
|
+
**追記:**
|
13
|
+
|
14
|
+
画像が「横幅いっぱい」を基準に作られていないのがそもそもの問題な気もしますが。
|
15
|
+
|
16
|
+
```CSS
|
17
|
+
.picture img {
|
18
|
+
object-fit: cover;
|
19
|
+
width: 100%;
|
20
|
+
}
|
21
|
+
```**動くサンプル:**[https://jsfiddle.net/qwc4p9Ln/1/](https://jsfiddle.net/qwc4p9Ln/1/)
|
22
|
+
|
23
|
+
【Can I use... Support tables for HTML5, CSS3, etc】
|
24
|
+
[http://caniuse.com/#search=object-fit](http://caniuse.com/#search=object-fit)
|
25
|
+
|