0
フレックスボックスでFirefoxで縦に整列した画像を作成する方法はわかりません。フレックスボックスでFirefoxで反応する画像を表示するには
マイコードは、Safariの
ではなく、Firefoxで動作します。
画像の重複は、ウィンドウをschrinkingとき、親のdivを重ね続けます。
.wrapper {
position: absolute;
top: 10px;
bottom: 10px;
left: 10px;
right: 10px;
border: 1px solid red;
padding: 10px;
}
.flexbox {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid green;
}
.flex-child {
border: 2px solid blue;
}
.flex-child img {
max-width: 100%;
max-height:100%;
height: auto;
}
そして、ここでのhtml:
<div class="wrapper">
<div class="flexbox">
<div class="flex-child">
<img src="http://dummyimage.com/800X600/000/fff">
</div>
</div>
</div>
そしてJSFiddleへのリンク
は、ここに私のCSSです。
あなたのコードはChromeとFirefoxでは使えますが、Safariでは使えません;) –
何について:h ttps://jsfiddle.net/wL15mb0w/8/ –
@ RokoC.Buljanありがとうございますが、私は画像をラッパーdivに整列させたいと思います:[Screenshot](https://dl.dropboxusercontent.com/u/ 7320961/screenshots/safari.jpg) –