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學習手冊
296
|
第九章
white-space 特性
white-space
特性可指定元素裡面的空白處理方式。
white-space
特性的值包括
normal
nowrap
pre
pre-line
pre-wrap
inherit
。當它被設為
normal
時,文字會在行尾換
行,空白會被減為最多一個空格。如果將它設為
nowrap
值,將會強制不分行文字,以符
合父容器的寬度。
prewrap
通常比
nowrap:
更容易讓使用者閱讀:雖然它會保留原本的空
白,但是它會在接觸容器方塊的邊緣時換行。
若要讓
text-overflow: elipses;
生效,就不能將文字換行。這也就是我們在這裡討論這
CSS 1 功能的原因。
方塊陰影
我們經常使用方塊陰影來讓元素產生浮出螢幕的效果。在 CubeeDoo,我們使用
box-
shadow
來讓卡片稍微浮出遊戲盤。當我們建立 CSS3 原生的 iPhone 應用程式外觀時,我
們使用
box-shadow
在按鈕上建立兩個微妙的陰影效果。
box-shadow
特性可對元素添加外陰影或內陰影,或兩者。一個方塊可以附加一或多個
box-shadow
,讓你建立一些很酷的功能。陰影會被畫在邊框的外面,如果你使用
inset
會畫在邊框的裡面。
box-model
而言,陰影類似
outline
text-shadow
,它們不會牽動版面配置,因為它
們可以和其他方塊重疊。從 IE9 開始,所有瀏覽器都支援它。對於 Android 3.0 iOS
5,請加入預設的無製造商語法及
-webkit- ...
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