deyum 发表于 2013-2-7 16:42:04

CSS文集《The CSS Anthology》 第二章 文本格式化及其它基础知识 (2)

11. 为段落文本加高亮
<div><h1 class="pg39">Chinese-style Stuffed Peppers</h1>Below, I've created a CSS rule for all te level-one headings in a document. The result is shown in Figure 2.11.hello, world......</div><div class="pg39"><h1 class="pg39">Chinese-style Stuffed Peppers</h1><p>These <span class="pg39_highlight">stuffed peppers</span> are lovely as a starter, or as a side sish for a Chinese meal. They also go down well as part of a buffet, and even children seem to like them.</p></div>
/* 设置文本高亮 */.pg39_highlight {background-color : #FFFFCC;color : #B22222;}

<div style="text-align: center;">http://dl.iteye.com/upload/attachment/0063/4057/bb2f3b9e-7a4d-3208-991a-212f7cbaafc2.jpg
页: [1]
查看完整版本: CSS文集《The CSS Anthology》 第二章 文本格式化及其它基础知识 (2)