aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/learn/css/styling_text/index.html
blob: 2d5368fdfea5d1b543a23a2e74c97b11fc7c0336 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
title: 文字樣式
slug: Learn/CSS/Styling_text
translation_of: Learn/CSS/Styling_text
---
<div>{{LearnSidebar}}</div>

<p class="summary">託了 CSS 語言基礎的福,下一個讓你專攻的 CSS 主題是文字樣式——最常會在 CSS 使用的部分。讓我們來看看文字樣式的基礎知識,包含設定字形、粗細、斜體、行距與字距、陰影以及更多文字功能。我們會套用客製化字形、設定清單樣式和連結樣式到你的網頁來完成這個單元。</p>

<h2 id="先備知識">先備知識</h2>

<p>在開始這個單元之前,你應該先熟悉基礎的 HTML,如 <a href="/en-US/docs/Learn/HTML/Introduction_to_HTML">HTML 介紹</a> 這個單元所討論的,並且要對 CSS 的基礎感到輕鬆,如 <a href="/en-US/docs/Learn/CSS/Introduction_to_CSS">CSS 介紹</a> 討論的。</p>

<div class="note">
<p><strong>Note</strong>: If you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as <a href="http://jsbin.com/">JSBin</a>,<a href="https://codepen.io/"> CodePen</a> or <a href="https://thimble.mozilla.org/">Thimble</a>.</p>
</div>

<h2 id="指南">指南</h2>

<p>這個單元包含以下的文章會教導你?設定 HTML 文字內容樣式的全部要領。</p>

<dl>
 <dt><a href="/en-US/docs/Learn/CSS/Styling_text/Fundamentals">基本的字形及文字樣式</a></dt>
 <dd>In this article we go through all the basics of text/font styling in detail, including setting font weight, family and style, font shorthand, text alignment and other effects, and line and letter spacing.</dd>
 <dt><a href="/en-US/docs/Learn/CSS/Styling_text/Styling_lists">清單樣式</a></dt>
 <dd>Lists behave like any other text for the most part, but there are some CSS properties specific to lists that you need to know about, and some best practices to consider. This article explains all.</dd>
 <dt><a href="/en-US/docs/Learn/CSS/Styling_text/Styling_links">連結樣式</a></dt>
 <dd>When styling links, it is important to understand how to make use of pseudo-classes to style link states effectively, and how to style links for use in common varied interface features such as navigation menus and tabs. We'll look at all these topics in this article.</dd>
 <dt><a href="/en-US/docs/Learn/CSS/Styling_text/Web_fonts">網頁字形</a></dt>
 <dd>Here we will explore web fonts in detail — these allow you to download custom fonts along with your web page, to allow for more varied, custom text styling.</dd>
</dl>

<h2 id="Assessments">Assessments</h2>

<p>The following assessments will test your understanding of the text styling techniques covered in the guides above.</p>

<dl>
 <dt><a href="/en-US/Learn/CSS/Styling_text/Typesetting_a_homepage">Typesetting a community school homepage</a></dt>
 <dd>In this assessment we'll test your understanding of styling text by getting you to style the text for a community school's homepage.</dd>
</dl>