Skip to Content
Responsive Web Design 響應式網頁設計學習手冊
book

Responsive Web Design 響應式網頁設計學習手冊

by Clarissa Peterson
December 2014
Intermediate to advanced
416 pages
5h 33m
Chinese
GoTop Information, Inc.
Content preview from Responsive Web Design 響應式網頁設計學習手冊
9. 排版
|
283
如圖 9-8 所示,行高 1.4 讓文字非常容易閱讀,並且具有適度的
間隔。
9-8 行高 1.4 的文字
文本寬度也會影響到頁面上該使用什麼行高比較合適。文字行越寬,
行與行之間就需要更多空間。你可以使用媒體查詢做這項調整。
另外,較厚重的文字(想一想︰字母線條較粗)比相對輕巧的文字
需要更大的行高。
行長度
就可讀性而言,大區塊文字的最佳行長度(line length)為 45–75
字元,包括空格。
在響應式網站中,你特別需要注意這個,因為你的內容寬度會根據
視埠寬度而變化。
如圖 9-9,超級長的文字行很難閱讀,因為你的眼睛很難從一行移到
下一行。
9-9 非常長的文字行很難閱讀
如圖 9-10,非常短的文字行讀起來很累,因為你的眼光必須不斷地
來回移動。
284
|
響應式網頁設計學習手冊
9-10 閱讀非常短的文字行時,你的眼睛很快疲勞
記住,這些數字是參考指南,而不是鐵則,你必須試驗你的頁面,
看看怎麼安排才好。
測試行長度
為了確保你的行長度總是落在可接受的範圍內,你必須能夠測試它,
而不需要每次在那邊算字元。一種簡單的做法是使用 <span> 包住第
45 到第 75 個字元,並且使用 CSS 強調這段文字,如圖 9-11 所示。
你能夠賦予該段文字背景顏色 ...
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

HTML5 錦囊妙計

HTML5 錦囊妙計

Christopher Schmitt, Kyle Simpson
深入淺出 jQuery

深入淺出 jQuery

Ryan Benedetti, Ronan Cranley
Pro JSF and HTML5: Building Rich Internet Components, Second Edition

Pro JSF and HTML5: Building Rich Internet Components, Second Edition

Hazem Saleh, Allan Lykke Christensen, Zubin Wadia

Publisher Resources

ISBN: 9789863473305