DIV属性

来源:互联网 发布:python init 函数 编辑:程序博客网 时间:2024/06/07 13:08

DIV属性:

id=XX

style=" 内部填div的具体属性  ",常用的内容如下:

 

1.

color : #999999 文字颜色

2.

font-family : 宋体 文字字型
font-size : 10pt 文字大小
font-style:itelic 文字斜体育
letter-spacing : 1pt 文字间距

3.

font-weight:bold 文字粗体
vertical-align:sub 下标字
vertical-align:super 上标字
line-height : 200% 设定行高

4.

text-decoration:overline加顶线/underline加底线

text-transform : capitalize 首字大写
text-transform : uppercase 英文大写
text-transform : lowercase 英文写

 5.

text-align:right 文字*右对齐
text-align:left 文字*左对齐
text-align:center 文字置中对齐
6.背景
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轴的位置

7.边框
border-top : 1px solid black 上框
border-bottom : 1px solid #6699cc 下框
border-left : 1px solid #6699cc 左框
border-right : 1px solid #6699cc 右框
border: 1px solid #6699cc 四边框
8.链接
A 所有超连接
A:link 超连接文字格式
A:visited 浏览过的连接文字格式
A:active 按下连接的格式
A:hover 鼠标移至连接

9.虚线
<TEXTAREA STYLE="border:1px dashed pink">
  实线
<TEXTAREA STYLE="border:1px solid pink">

 

 

 

 

id=u1 style="position:absolute; left:-40px; top:15px; width:400px; height:75px;  text-align: center ;"

id=u2 style="position:absolute; left:400px; top:40px; width:100px; height:30px; line-height:30px;text-align:center;  border-top:solid 1px  #BD6B09; border-left:solid 1px  #BD6B09;  "

原创粉丝点击