欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

用CSS實(shí)現(xiàn)文本左右對(duì)齊且首行縮進(jìn)的代碼

  發(fā)布時(shí)間:2010-04-05 23:27:57   作者:佚名   我要評(píng)論
關(guān)于這個(gè)小問(wèn)題呢,我也想到了<<精通CSS與HTML設(shè)計(jì)模式>>這本書的第11章介紹的分割這一節(jié)的文章有介紹,但這本書我也沒(méi)有放在公司,也就不管它了;今天翻起這本書也正好看到了,特把原來(lái)沒(méi)有解決的問(wèn)題給解決掉了。

先看效果圖吧:

其源代碼就比較干凈了,源碼如下:

復(fù)制代碼
代碼如下:

<p class="elegant">Our online order form allows you to order directly in the internet, saving your time and offering you convenience. Here’s how you do it.</p>
<p class="elegant">When you want to buy our commodities, please register first. After you create your account successfully, you can directly order our products and pay for them. Next time you just click “log in”, you can enter your account, then shopping simply and conveniently.</p>

最重要的就是CSS了,代碼如下:

復(fù)制代碼
代碼如下:

<style type="text/css">
*.elegant
{
margin-left: 40px;
margin-right: 80px;
letter-spacing: 1px;
word-spacing: 2px;
line-height: 1.7em;
text-indent: 40px;
text-align: justify;
}
</style>

上面簡(jiǎn)單的CSS樣式就實(shí)現(xiàn)了文本的左右對(duì)齊,并且段落的首行是縮進(jìn)的.

相關(guān)文章

最新評(píng)論