Skip to Content
MOBILE HTML5學習手冊
book

MOBILE HTML5學習手冊

by Estelle Weyl
June 2014
Intermediate to advanced
488 pages
9h 56m
Chinese
GoTop Information, Inc.
Content preview from MOBILE HTML5學習手冊
354
|
第十一章
flex-direction: column;
}
}
請記得,一定要檢視小型與大型格式的版面,在適當或必要的時候建立媒體查詢版面配
置中斷點。
使用 @supports 來偵測功能
雖然行動領域還沒有支援
@supports
,而且它目前只處於 W3C 的候選建議等級,但
Firefox Opera 已經開始支援它了。
@supports
@ 規則可以協助我們為支援或不支援
Flexbox 的瀏覽器建立獨立的版面,而且不需要任何 hack
瀏覽器開始支援 Flexbox 之後,還要經過很長一段時間,使用者設備才會全部都支援
Flexbox。我們肯定會尋求其他的 CSS 新功能,它們如同 Flexbox,會使用既有的 CSS
特性的值:如
display: flex;
@supports
類似
@media
,但它不會根據瀏覽器與設備的指
標來選擇瀏覽器,而是根據瀏覽器對 CSS 的支援情形:
@supports (display: flex) and (background-color: red) {
h1 {color: green;}
}
這會讓同時支援
display: flex;
background-color: red;
的瀏覽器的所有
<h1>
變成綠
色的,它不會讓任何背景顏色變成紅色。這只是用來測試特性與特性值的支援情形。
在過渡期間,有一些瀏覽器使用
@media
來偵測功能:
@media screen and (-webkit-transform-3d) {
h1 {
-webkit-transform: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

JAVASCRIPT網頁應用程式設計

JAVASCRIPT網頁應用程式設計

Alex MacCaw

Publisher Resources

ISBN: 9789863471240