第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

響應(yīng)式布局:Safari 上的拉伸圖像

響應(yīng)式布局:Safari 上的拉伸圖像

Go
慕哥6287543 2023-08-21 16:40:43
這是我的布局。所需的行為是,當(dāng)我垂直調(diào)整窗口大小時(shí),圖像會(huì)縮放并保持原始寬高比。我的代碼在除 Safari 之外的所有瀏覽器中都運(yùn)行良好(您可以通過(guò)在不同瀏覽器中嘗試該代碼片段來(lái)看到它)。你有解決方案嗎?謝謝 ;).wrap-container{  width: 100%;  display: flex;  justify-content: center;  background-color: yellow;  height: 55vh;}.wrap{  width: 700px;  background-color: aqua;  display: flex;  justify-content: flex-start;  align-items: flex-end;  padding-top: 64px;}.wrap img{    height: 100%;    width: auto;    max-width: 300px;    max-height: 300px;}<div class="wrap-container">  <div class="wrap">    <img src="https://via.placeholder.com/300"/>  </div></div>
查看完整描述

1 回答

?
泛舟湖上清波郎朗

TA貢獻(xiàn)1818條經(jīng)驗(yàn) 獲得超3個(gè)贊

添加flex: 0;到圖像上


.wrap-container{

  width: 100%;

  display: flex;

  justify-content: center;

  background-color: yellow;

  height: 55vh;

}


.wrap{

  width: 700px;

  background-color: aqua;

  display: flex;

  justify-content: flex-start;

  align-items: flex-end;

  padding-top: 64px;

}


.wrap img{

    height: 100%;

    width: auto;

    flex: 0;

    max-width: 300px;

    max-height: 300px;

}

<div class="wrap-container">

  <div class="wrap">

    <img src="https://via.placeholder.com/300"/>

  </div>

</div>


查看完整回答
反對(duì) 回復(fù) 2023-08-21
  • 1 回答
  • 0 關(guān)注
  • 338 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)