手机
当前位置:查字典教程网 >网页设计 > Div+Css教程 >用CSS实现文本左右对齐且首行缩进的代码
用CSS实现文本左右对齐且首行缩进的代码
摘要:先看效果图吧:其源代码就比较干净了,源码如下:Ouronlineorderformallowsyoutoorderdirectlyinthe...

先看效果图吧:

用CSS实现文本左右对齐且首行缩进的代码1

其源代码就比较干净了,源码如下:

<p>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>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了,代码如下:

<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>

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

【用CSS实现文本左右对齐且首行缩进的代码】相关文章:

用css实现十字的布局示例代码

用CSS实现简单的进度条

CSS文本如何折行介绍

巧用CSS3 border实现图片遮罩效果代码

纯CSS实现鼠标悬停提示的方法

用CSS轻松实现网上填空

用CSS巧控制段落缩进的方法

使用CSS代码的空格实现中文对齐的方法

CSS实例:让页脚保持在未满屏页面的底部

纯CSS实现的鼠标经过文本时提示的信息

精品推荐
分类导航