CSS设置文本——字母、单词、段落
2011-09-17 22:36
253 查看
<1>字母大小写
capitalize这个词的意思就是“把……的首字母大写”。
当你看了这个效果之后就一切都明白了。
<2>单词间距
这个用法可以将外观设置的更加好看。
更加美观。
<3>段落不换行
就目前来看,这个技术好像没有什么用处。
<html> <head> <style type="text/css"> h1 {text-transform: uppercase} p.uppercase {text-transform: uppercase} p.lowercase {text-transform: lowercase} p.capitalize {text-transform: capitalize} </style> </head> <body> <h1>This Is An H1 Element</h1> <p class="uppercase">This is some text .</p> <p class="lowercase">This is some text .</p> <p class="capitalize">This is some text .</p> </body> </html>
capitalize这个词的意思就是“把……的首字母大写”。
当你看了这个效果之后就一切都明白了。
<2>单词间距
<html> <head> <style type="text/css"> p.spread {word-spacing: 30px} p.tight {word-spacing: -0.5em} </style> </head> <body> <p class="spread">This is some text.</p> <p class="tight">This is some text.</p> </body> </html>
这个用法可以将外观设置的更加好看。
更加美观。
<3>段落不换行
<html> <head> <style type="text/css"> p {white-space: nowrap} </style> </head> <body> <p> 这是一些文本。 这是一些文本。 这是一些文本。 这是一些文本。 这是一些文本。 这是一些文本。 这是一些文本。 这是一些文本。 这是一些文本。 这是一些文本。 这是一些文本。 这是一些文本。 </p> </body> </html>
就目前来看,这个技术好像没有什么用处。
相关文章推荐
- css设置文本最多显示两行,多余部分为省略号
- css文本布局的设置
- CSS设置文本——各个字符间距
- <P>段落标签</p>设置字体和大小,颜色以及与<font>文本标签</font>
- CSS中图片于文本的基线对齐设置
- css文本设置
- [CSS]如何设置文本的右外边距
- 第六步:页面内的基本文本的样式(css)设置
- html(三)页面基本标签及文本段落的设置
- div +CSS 滚动条、文本设置等
- SQLServer 设置单词首字母大写
- <P>段落标签</p>设置字体和大小,颜色以及与<font>文本标签</font>
- css中图片于文本的基线对齐与vertical-align属性设置
- CSS之背景设置、字体设置、文本设置
- CSS基础知识二(段落设置CSS效果、图片边框、div和span区别、CSS控制背景、CSS控制链接)
- [CSS]如何设置文本的左外边距
- CSS设置【强制不换行】【自动换行】【强制英文单词断行】
- CSS设置文本——行间距
- Count words and letters-计算用户输入一行文本中的单词数和每个字母出现次数
- H5学习笔记——CSS文本设置属性&颜色表示法