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

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

Safari 嵌套 Flex 問題

Safari 嵌套 Flex 問題

拉風(fēng)的咖菲貓 2024-01-03 15:12:04
具有同級(jí)的嵌套彈性框?yàn)閒lex-grow : 1和Overflow-y : auto在 Safari 中無法按預(yù)期工作[我的版本 13.1 (14609.1.20.111.8)]。這在 Chrome 中再次表現(xiàn)出色。附上這兩項(xiàng)的屏幕截圖以及最小的可重現(xiàn)代碼塊。如果我們給第二個(gè)子元素 flex-basis : [n]px 一個(gè)固定的大小..它工作得很好。但我們不能總是期望給出這一點(diǎn),因?yàn)榈诙€(gè)項(xiàng)目中的內(nèi)容是動(dòng)態(tài)的。在下面的代碼塊中,它顯示了最小的可重現(xiàn)用例。.parent {  flex-direction: column;  display: flex;  background-color: #CCC;  padding: 8px;  height: 150px;  font-size: 16px;}.fixedChild {  display: flex;  padding: 10px;  justify-content: space-between;  flex-basis: auto;}.growingChild {  overflow-y: auto;  flex-grow: 1;}/*! CSS Used from: Embedded */.fancyButton {  background-color: transparent;  border: 1px solid transparent;  border-color: #0076D1;  border-radius: 15px;  color: #0076D1;  height: 50px;  justify-content: center;  outline: none;  padding: 0 8px;}<div class="parent">  <div class="growingChild">    Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.  </div>  <div class="fixedChild">    <button class="fancyButton" type="button">button 1</button>    <button class="fancyButton" type="button">button 1</button>    <button class="fancyButton" type="button">button 1</button>  </div></div>
查看完整描述

1 回答

?
胡子哥哥

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

這并沒有解決潛在的不一致問題,而是將最后一個(gè)子項(xiàng)(彈性項(xiàng)目)設(shè)置為:

flex-shrink: 0;

似乎使 Safari 和 Chrome 的行為相同,其中 Flex 容器占按鈕的高度以及不斷增長(zhǎng)的 Flex 項(xiàng)目同級(jí)。不確定誰對(duì)誰錯(cuò),但我覺得也許是 Safari ???


查看完整回答
反對(duì) 回復(fù) 2024-01-03
  • 1 回答
  • 0 關(guān)注
  • 182 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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