CSS文字排版终极指南(2)
作者:神采飞扬 来源:前端观察 发布时间:2010-01-19 10:30:00
制作有吸引力的段落
对于更有吸引力的段落排版,可以采用Robert Bringhurst的方法,它约定:用你的文字大小乘以30就可以得到段落的宽度。
比如如果你的文字大小是12px,用30乘以它,也就是360px,这样每行大约可以呈现65个英文字符。
不正确的段落大小:
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
正确的段落大小
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
Line-height示例
行高用来限定每行文字之间的空白大小。一个经验之谈就是让行高比你的字体大6-7px。
比如,如果你的文字大小是12px,加上6px就是你的行高,也就是18px。
不正确的Line-Height
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
正确的Line-Height
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
PS:关于line-height的设置,推荐一下码头写的《line-height的继承问题》


猜你喜欢
- 霍夫变换是一种检测任何形状的流行技术,可以检测形状,即使它被破坏或扭曲一点点.一条线可以表示成y = mx + c或参数形式,像ρ=xcos
- JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式。它基于ECMAScript的一个子集。 JSO
- 1 旖旎风景马上虎年了,也是我的生肖年,很激动!(不小心暴露了年龄,哈哈哈......),这里先给大家拜年啦,祝大家虎年快乐,虎年爆富!&n
- 成果库修改: 要求主题列表随成果类型改变而改变  
- mysqldump工具备份备份整个数据库$> mysqldump -u root -h host -p dbname > bac
- 存储过程的优缺点: 存储过程优点: 1.由于应用程序随着时间推移会不断更改,增删功能,T-SQL过程代码会变得更复杂,StoredProce
- Python3.6.4必须downgrade成3.5pip版本最低9.0.3自己的电脑必须已经安装好git关于anaconda prompt
- 话说本来我的电脑有个2000的数据库,去年我在那个电脑上新装了一个2005的数据库。前不久我买了台新电脑,装了数据库2008 将在旧电脑上的
- 首先,单表的UPDATE语句:UPDATE [LOW_PRIORITY] [IGNORE] tbl_nameSET col_name1=ex
- 本文实例讲述了JS获取日期的方法。分享给大家供大家参考,具体如下:原理很简单,一天的时间的毫秒数是1000*60*60*24,前n天的日期就
- 在JAVA WEB应用中,如何获取servlet请求中的参数,并传递给跳转的JSP页面?例如访问http://localhost:8088/
- 本文实例讲述了CodeIgniter分页类pagination使用方法。分享给大家供大家参考,具体如下:controller控制器(appl
- 本文实例为大家分享了Python实现图书馆座位自动预约的具体代码,供大家参考,具体内容如下配置通过公网主机定时运行脚本,并发送邮件到自己的q
- Numpy在python中属于非常常用的包,无论是机器学习搭配pandas,还是数据可视化搭配pylab都是很正常的搭配。Numpynump
- Go被设计为一种后台语言,它通常也被用于后端程序中。服务端程序是GO语言最常见的软件产品。在这我要解决的问题是:如何干净利落地升级正在运行的
- 今天发现有一个程序插入的时间不对,而该字段是配置的默认值 CURRENT_TIMESTAMP,初步判断是数据库的时区设置问题。查看时区登录数
- ERROR 1819 (HY000): Your password does not satisfy the current policy
- python字符串查找函数的使用打开Python开发工具IDLE,新建‘findstr.py'文件,并写代码如下:s ='/
- 本文实例讲述了Python简单遍历字典及删除元素的方法。分享给大家供大家参考,具体如下:这种方式是一定有问题的:d = {'a
- 本篇博客主要介绍的是pyinstaller在windows下的基本使用和基础避坑在windows中使用pyinstaller工具打包时会出现