CSS代码文字段落设置

html-css011

CSS代码文字段落设置,第1张

解决:

这样就好了。

Css

<style type="text/css">

.one{

font-size:10px

color:#FF0000

font-weight:bold

}

.two{

font-size:18px

color:#00FF00

text-decoration:underline

}

.three{

font-size:18px

color:#0000FF

text-decoration:overline

}

</style>

Html

<p class="one">加油、努力</p>

<p class="two">加油、努力</p>

<p class="three">加油、努力</p>

呵呵。

text-align: 段落水平对齐设置值:center、right、left、justify(继承)

vertical-algin: 段落垂直对齐设置值:sub(垂直对齐文本的下标。) super(垂直对齐文本的上标) top(上) middle(中) bottom(下) 10px -10px 相对于元素行高属性的百分比

letter-spacing: 字母的间距

word_spacing: 单词的间距

line-height: 文本行高

text-indent: 缩进方式

white-space: 排版方式设置值:normal (默认,空白会被忽略) pre(原样显示) nowrap(文本不会换行)

把下列代码拷到记事本,后缀改为html

<style>

.style1 { font-size:10ptcolor:#FF0000font-weight:bold}

.style2 { font-size:18ptcolor:#00FF00text-decoration:underline}

.style3 {font-size:18pttext-decoration:overlinecolor:#0000FF}

</style>

<body>

<p class="style1">CSS分类使用</p>

<p class-"style2">CSS分类使用</p>

<p class-"style3">CSS分类使用</p>

</body>