DIV的属性

color : #999999 文字颜色 
font-family : 宋体 文字字型 
font-size : 10pt 文字大小 
font-style:itelic 文字斜体育
font-variant:small-caps 小字体
letter-spacing : 1pt 文字间距
line-height : 200% 设定行高
font-weight:bold 文字粗体
vertical-align:sub 下标字
vertical-align:super 上标字
text-decoration:line-through 加?h除线
text-decoration:overline 加顶线
text-decoration:underline 加底线
text-decoration:none ?h除连接底线
text-transform : capitalize 首字大写
text-transform : uppercase 英文大写
text-transform : lowercase 英文写
text-align:right 文字*右对齐
text-align:left 文字*左对齐
text-align:center 文字置中对齐 

这些是一些简单的文字效果,可以应用到css的页面中。 


背景
background-color:black 背景颜色 
background-image : url(image/bg.gif) 背景图片
background-attachment : fixed 固定背景
background-repeat : repeat 重复排列-网页预设
background-repeat : no-repeat 不重复排列
background-repeat : repeat-x 在x轴重复排列
background-repeat : repeat-y 在y轴重复排列
background-position : 90% 90% 背景图片x与y轴的位置  
链接
A 所有超连接
A:link 超连接文字格式 
A:visited 浏览过的连接文字格式 
A:active 按下连接的格式 
A:hover 鼠标移至连接
边框
border-top : 1px solid black 上框 
border-bottom : 1px solid #6699cc 下框 
border-left : 1px solid #6699cc 左框 
border-right : 1px solid #6699cc 右框
border: 1px solid #6699cc 四边框
虚线
<TEXTAREA STYLE="border:1px dashed pink">
实线
<TEXTAREA STYLE="border:1px solid pink">

设置div的高度与文字的行高一样就可以了,即 line-height 和 height 的数值是一样的就可以了,最后给div一个 over-flow: hidden ,让超出的部分隐藏. 
div所有属性/DIV各种属性解释

原文地址:https://www.cnblogs.com/hejinyang/p/3429966.html