做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

css如何實現適配iphone全面屏

來源:懂視網 責編:小采 時間:2020-11-02 22:15:30
文檔

css如何實現適配iphone全面屏

css如何實現適配iphone全面屏:一、media query方式/*iPhone X 適配*/ @media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) { .fixed-bottom{ bottom: 37px; } } /*i
推薦度:
導讀css如何實現適配iphone全面屏:一、media query方式/*iPhone X 適配*/ @media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) { .fixed-bottom{ bottom: 37px; } } /*i

一、media query方式

/*iPhone X 適配*/
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
 .fixed-bottom{
 bottom: 37px;
 }
}
/*iPhone XS max 適配*/
@media only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio:3) {
 .fixed-bottom{
 bottom: 37px;
 }
}
/*iPhone XR max 適配*/
@media only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio:2) {
 .fixed-bottom{
 bottom: 37px;
 }
}

存在的問題:在微信webveiw內部此方案能在元素底部加上安全區域寬度,沒有問題。但是在safari等有底欄的瀏覽器(頁面顯示區域已經在安全區內部)也同樣會加上安全區寬度。

(視頻教程:css視頻教程)

二、CSS函數

蘋果在推出全面屏之后提供的CSS函數,ios<11.2為constant(),ios>11.2為env()。可填入safe-area-inset-top、safe-area-inset-left、safe-area-inset-right、safe-area-inset-bottom對應上下左右的安全區域寬度。env 和 constant 只有在 viewport-fit=cover 時候才能生效。

代碼如下:

meta標簽加入viewport-fit=cover

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover">

css寫法,不支持env、constant的瀏覽器會忽略此樣式

.fixed-bottom{
 bottom: 0;
 bottom: constant(safe-area-inset-bottom);
 bottom: env(safe-area-inset-bottom);
}

推薦教程:CSS入門基礎教程

聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

css如何實現適配iphone全面屏

css如何實現適配iphone全面屏:一、media query方式/*iPhone X 適配*/ @media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) { .fixed-bottom{ bottom: 37px; } } /*i
推薦度:
標簽: iphone 全面屏 適配
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 望都县| 虞城县| 福安市| 罗田县| 麻阳| 浏阳市| 商洛市| 香河县| 鱼台县| 大姚县| 荃湾区| 德阳市| 遵义县| 西林县| 乡城县| 新丰县| 宁国市| 浮梁县| 信丰县| 霍山县| 绥德县| 平乐县| 余江县| 巴彦县| 阿拉善右旗| 沙田区| 永仁县| 绥化市| 棋牌| 西畴县| 恩施市| 冀州市| 玉林市| 吕梁市| 徐闻县| 徐汇区| 江口县| 棋牌| 宣城市| 兴文县| 临江市|