关于文字特性的一些设置
2017-03-22 15:56
323 查看
今天来说一下关于css中文字的一些新特性,其中包含了字间距、词间距、 首行缩进、
字母大小写、空白的处理、强制换行、自动换行、inlin-block的对齐方式的一些使用
1.direction
2.letter-spacing字间距,只对英文字母有效果
3.word-spacing,控制词间距 只对英文有效
4.text-indent首行缩进两个字符
5.text-transform控制字母大小写
6.write-space
7.text-overflow
如果有什么错的地方,欢迎指正
4000
邮箱:eternalshallow@163.com
字母大小写、空白的处理、强制换行、自动换行、inlin-block的对齐方式的一些使用
1.direction
/*控制内联块的对齐方式*/ .test{ direction: rtl;//从右到左 direction: rtl;//从左到右 } .test span{ display: inline-block; } <div class="test"> <span>一蓄意,危乎高哉!</span> <span>derection使用</span> </div>
2.letter-spacing字间距,只对英文字母有效果
/*控制字间距*/ .letter-spacing{ letter-spacing: 10px; } <div class="letter-spacing"> letterspaing 只对英文有效 </div>
3.word-spacing,控制词间距 只对英文有效
.word-spacing{ word-spacing: 100px; } <div class="word-spacing"> word-spacing word-spacing word-spacing word-spacing词间距,针对英文</div>
4.text-indent首行缩进两个字符
/*首行缩进两个字符*/ .text-index{ text-indent: 2em; } <div class="text-indent"> 一蓄意,危乎高哉!一蓄意,危乎高哉!一蓄意,危乎高哉! 一蓄意,危乎高哉!一蓄意,危乎高哉!一蓄意,危乎高哉! 一蓄意,危乎高哉!一蓄意,危乎高哉!一蓄意,危乎高哉! 一蓄意,危乎高哉!一蓄意,危乎高哉!一蓄意,危乎高哉! 一蓄意,危乎高哉!一蓄意,危乎高哉!一蓄意,危乎高哉! 一蓄意,危乎高哉!一蓄意,危乎高哉!一蓄意,危乎高哉! </div>
5.text-transform控制字母大小写
.text-transform{ text-transform: uppercase;//字母大写 text-transform: capitalize;//首字母大写 } <div class="text-transform"> text-transform字母大小写 </div>
6.write-space
.write-space{ /*white-space: nowrap;//强制不换行*/ /*white-space: pre;//完全保留空格一类的,并且不会自动换行*/ /*white-space: pre-line;//去掉多余空白*/ white-space: pre-wrap;//保留空白,当空间不够时,自动换行 } <div class="write-space"> write-space <br> write -space write-space </div>
7.text-overflow
.text-overflow{ text-overflow: ellipsis;//多出的部分用...代替 } <div class="text-overflow"> word-spacing word-spacing word-spacing word-spacing 配合white- spacing overflow使用 </div>
如果有什么错的地方,欢迎指正
4000
邮箱:eternalshallow@163.com
相关文章推荐
- 关于[学思湖怪超COOL文字生成器2_Beta2]发布的一些说明 ^c^
- 一些关于文字编码的资料
- 关于特性回收的一些想法
- TextView加链接的一些方法以及设置个别文字格式
- 关于 mldonkey 的一些讨论和设置
- 关于Debian Liunx的一些设置
- 关于Ubuntu的一些设置.
- 关于Eclipse3.3中内容助手不是Alt+/的问题解答,以及它的一些其他新特性
- 关于VIVI的一些设置bootloader
- 关于SecureCRT的一些设置
- 关于MTU的一些概念与设置技巧
- 关于vc6.0中常见的因为工程设置project setting设置不对而造成连接错误的一些情况和解决方法(转)
- 关于飞鸽传书(IpMsg)的一些文字
- 关于SharePoint账号设置的一些Tips
- 关于一些常用SQL设置数据库的语句
- 一些关于GDI+的文字(zz)
- 关于Oracle Shared Server及一些参数设置
- 关于MTU的一些概念与设置技巧
- 【转】关于 PHP Session 的 Time out 和有效设置 Session 时间限制的一些小结
- [原创]关于NOTIFYICONDATA的一些新特性