着重
<em>用于表示一段内容中的着重点. 用于句中某个词
<strong>用于表示一个内容的着重 用于某段话
<i>可以使文字变为斜体
<b>可以使文字变为粗体
<small>表示标注,会使字体变小
<big>表示重点 会使字体变大
<cite>可以指明对某内容的引用或参考。 相当于斜体
<bkockquote>表示标记引用的文本 会加引号
<q>用于短引用 会换行
<sup> 定义上标
<sub>定义下标
<ins>表示插入的内容,表现为下划线
<del>表现删除的内容,表现为删除线
<code> 用于保留代码模式
<pre>预格式化文本 用pre包住code来表示一段代码




文本格式化
单位 px 也就是像素块
百分比 可以以比较对象为比较的百分比
em 是相对于font-size说的 1em =1font-size
十六进制颜色 用rga表示
用0-255表示颜色的深度也可以用百分比
十六进制颜色 用00-ff之间的组合表示

文字大小 font-size
字体设置 font-family 可设置多个字体

– font-variant:small-caps

斜体:font-style:italic
粗体:font-weight :bold
– font:加粗 斜体 小型大写 大小/行高 字体
•行间距 = line-height – font-size

–大写:text-transform:uppercase
–小写:text-tansform:lowercase
–首字母大写:text-transform:capitalize
–正常:text-transform:none
文本的修饰 ;text-decoration
–underline下划线
–overline上划线
–line-through 删除线
–none去除下划线
letter-spacing用来设置字符之间的间距。
word-spacing用来设置单词之间的间距
对齐文本:text-align
–left:左对齐
–right:右对齐
–justify:两边对齐
–center:居中对齐
text-indent用来设置首行缩进

盒子模型
•一个盒子我们会分成几个部分:
–内容区(content)
–内边距(padding)
–边框(border)
–外边距(margin)

内容区:指的是盒子中放置内容的区域,也就是元素
中的文本内容。
内边距指的就是元素内容区与边框以内
的空间。
边框是元素可见框的最外部
•边框可以设置多种样式:
–none(没有边框)
–dotted(点线)
–dashed(虚线)
–solid(实线)
–double(双线)
–groove(槽线)
–ridge(脊线)
–inset(凹边)
outset(凸边)
•外边距是元素边框与周围元素相距的空间。


网友评论