直接上代码,具体原理自己搜索网上一大堆
Welcome
two hours ago
Hi!
Welcome to my sample blog!
This post is here to help demonstrate how easy it is to take an existing site, along with full-width bars and fixed-position elements, and make it take full advantage of iPhone X's edge-to-edge display.
The actual post describing how to adopt the new API is over on the WebKit blog.
There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.There, you will learn all about new WebKit features, including
viewport-fit
,constant()
, safe area insets, andmin()
andmax()
.I hope that it helps you adopt these new features in your websites.