简明现代魔法 -> CSS层叠样式表 -> 用CSS控制文本左右对齐且首行缩进

用CSS控制文本左右对齐且首行缩进

2010-04-02

效果演示

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.

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.

CSS 代码如下:

*.elegant
{
	margin-left: 40px;
	margin-right: 80px;
	letter-spacing: 1px;
	word-spacing: 2px;
	line-height: 1.7em;
	text-indent: 2em;
	text-align: justify;
}

上面简单的CSS样式就实现了文本的左右对齐,并且段落的首行是缩进的。

前端 HTML 代码

<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>
随机文章推荐
网站分类


注:如需转载本文,请注明出处(原文链接),谢谢。更多精彩内容,请进入简明现代魔法首页。

进入新博客
喜欢本文,就分享它吧
给我留言
您的名字:
您的邮件:
您的网站:


 

copyright © 2009 简明现代魔法    学习、分享、进步

power by Gonn 感谢所有关心和支持本站的朋友们