关灯
开启左侧

使用Dreamweaver来详细了解CSS的多样性

[复制链接]
DeGe 发表于 2013-5-20 12:45:00 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题
 
说明:属性继承 ×不继承 
   [ ]为适应元素类型 无[ ]标出为所有元素

字体
Font-family
Font-size 9 10 12 14 16 18 24 36 xx-small x-small small medium large x-large xx-large smaller larger
Color
Font-style normal italic oblique
Line-height nomal
Font-weight normal bold bolder lighter 100 200 300 400 500 600 700 800 900
Text-transform capitalize uppercase lowercase none
Font-variant normal small-caps
×Text-decoration none underline overline line-through blink
Font

背景
×Background-color
×Background
×Background-image
×Background-attachment fixed scroll
×Background-repeat no-repeat repeat repeat-x repeat-y
×Background-position[块、替换]

区块
Word-spacing normal[块]
Letter-spacing normal
×Vertical-align baseline sub super top text-top middle bottom text-bottom[内]
Text-align left right center justify[块]
×Text-indent[块]
×White-space normal pre nowrap[块]
×Display inline block list-item run-in compact marker table inline-table table-row-group table-header-ground table-footer-ground table-row table-column-ground table-column table-cell table-caption none

边框
×Border
×Border-top-color
×Border-top-style none solid dashed dotted double groove ridge inset outset
×Border-top-width thin medium thick
×Border-top-Right
×Border-top-Bottom
×Border-top-Left
×Border-top
×Border-right
×Border-bottom
×Border-left
×Border-color
×Border-style
×Border-width

方框
×Width auto px pt in cm mm pc em ex %[块、替]
×Height auto[块、替]
×Float left right none
×Clear left right both none
×Margin
×Margin-top
×Margin-right
×Margin-bottom
×Margin-left
×Padding
×Padding-top
×Padding-right
×Padding-bottom
×Padding-left

列表
×List-style-type disc circle square decimal lower-roman upper-roman lower-alpha upper-alpha onne[显示值为list-item的元素]
×List-style-Image[显示值为list-item的元素]
×List-style-position inside outside[显示值为list-item的元素]

定位
×Position absolute relative static
×Visiblility visible hidden inherit
×Height auto
×Left auto
×Top auto
×Right auto
×Bottom auto
×z-index auto[定位元素]
×overflow visible hidden scroll auto[块、替]
×clip auto


说明:
color 设置文字颜色
#rgb
#rrggbb
rgb(255,255,255)
rgb(100%,100%,100%) H1{color:red}
H1{color:#f00}
H1{color:#ff0000}
H1{color:rgb(255,0,0)}
H1{color:rgb(100%,0%,0%)}

background-color 设置背景颜色,格式同上。 BODY{background-color:red}
BODY{background-color:#f00}
BODY{background-color:#ff0000}
BODY{background-color:rgb(255,0,0)}
BODY{background-color:rgb(100%,0%,0%)}
background-image 设置背景图片
url(/imageURL) body{backround-image:url(/back.jpg);}
background-repeat 设置背景图片是否重复排列:
repeat-x(X轴重复排列);
repeat-y(Y轴重复排列);
No-repeat(不重复排列) BODY{background-repeat:repeat-x;}
BODY{background-repeat:No-repeat;}
background-attachment 设定背景图片是否卷动,默认为卷动。
scroll(卷动)
fixed(不卷动) BODY{background-attachment:fixed;}
background-position 设定背景图片或背景颜色开始显示的位置,取值格式:
top,buttom,left,right,center(用关键字)
70px 10px(用长度值)
50% 30%(用百分比) BODY{background-position:right top;}
BODY{background-position:50px 10px;}
BODY{background-position:20% 50%;}
background 定义背景综合属性,不要求顺序,各属性值以空格分开。 BODY{background:#ffcc00 url(/bg.jpg) fixed center}
字型类
font-family 设置字型属性,取值可以是任何字型名称,缺省为浏览器内定字型,可以设多个以逗号(,)分开,有空格的英文字型可用单引号或双引号括起来。 P{font-family:宋体,楷体,黑体,"Time New Rom";}
font-style 设定字型样式:Normal(正常),italic、objlique(斜体) P{font-style:italic;}
font-variant 取值:Normal(默认),small-caps(如果是中文字型则将字型缩小显示,如果是英文则全部改为较小的大写) H3{font-variant:small-caps;}
font-weight 设定字体粗细,取值有:
Normal(默认),bold,lighter,border,100,200...900
由于浏览器支持程度不同,一般只用normal和bold两种属性。 P{font-weight:bold;}
font-size 设定字体的大小;
绝对大小:xx-small,x-small,small,mediumlarge,x-large,xx-large;
相对大小:larger,smaller;
数字表示可用单位:磅(pt),像素(px),英寸(in),厘米(cm);
亦可用百分比表示。 H2{font-size:36pt;}
P{font-size:200%;}
font 设定字型的综合属性,其顺序如下:
{font-style font-variant font-weight font-size /line-height font-family;} P{bold 12pt/14pt impact,Arial;}
文字类
letter-spacing 设定文字间距。 P{letter-spacing:5pt;}
text-decoration 设定文字加上下划线、删除线等效果:
none(无)
underline(下划线)
overline(上划线)
line-through(删除线)
vertical-align 设定文字或图片垂直方向的对齐方式:
baseline:默认值 sub:下标 super:上标 top:垂直向上对齐 middle:垂直居中 bottom:垂直向下对齐。
text-transform 转换英文字母大小写:
none:默认值 capitalize:首字母大写 uppercase:所有英文字母大写 lowercase:所有英文字母小写。
text-align 设置文字的水平对齐方式:
left:左对齐 right:右对齐 center:水平居中 justify:左右对齐。
text-indent 设定标记元素内文字的首行缩进或配合margin-left属性设定首行凸排。
line-height 设定行高,声明方式有标准行高、固定值表示法、百分比行高、字型大小比例行高等。
列表类
list-style-type 有序列表的编号方式(供<OL>标记使用):
none:无编号 decimal:阿拉伯数字 lower-roman:小写罗马数字 upper-roman:大写罗马数字 lower-alpha:小写英文字母 upper-alpha:大写英文字母。
list-style-type 无序列表的符号样式(供<UL>使用):
none:无符号 disc:实心圆符号 circle:空心圆符号 square:实心方形符号。
list-style-image 无序列表的自定义符号样式:
格式:url(图片名称) UL{list-style-imag:url(/dd.gif);}
list-style-position 设置列表清单符号缩排属性:
outside:凸排 inside:缩排 UL{list-style-imag:url(/dd.gif); list-style-positionutside;}
list-style 列表清单项目的综合设定,属性之间用空格隔开。 UL{list-style-imag:url(/dd.gif) inside;}
边界及其相关类
margin 标记元素边界值的综合设定。(其规则见右边范例)
亦可以用margin-top、margin-right、margin-bottom、margin-left分开设定各边的边界。 声明4个值,其顺序为上、右、下、左边界,如:DIV{margin:12pt 15pt 20pt 16pt;}
声明3个值,其顺序为上、右、下,缺少的左边界取其对边(右),如:DIV{margin:12pt 15pt 16pt;}
声明2个值,其顺序为上、右,缺少的下、左边界取其对边,如:DIV{margin:12pt 15pt;}
声明1个值,则4个边界同一个值,如:DIV{margin:15pt;}
padding 设定标记内容与标记边框之间的留白的综合设定(规则见margin属性的范例)。 也可分开设定padding-top、padding-right、padding-bottom、padding-left各值。
border-width 标记元素边框宽度的综合设定(规则类似于margin属性)。 也可分开设定border-top-width、border-right-width、border-bottom-width、border-left-width各值。
border-color 标记元素边框颜色的综合设定(规则类似于margin属性)。颜色取值见color属性。 也可分开设定border-top-color、border-right-color、border-bottom-color、border-left-color各值。
border-style 标记元素边框样式的综合设定(规则类似于margin属性)。边框样式有solid,double,goove,ridge,inset,outset等。 也可分开设定border-top-style、border-right-style、border-bottom-style、border-left-style各值。
border 标记元素4个边框的综合设定,可以分别声明边框宽度、边框样式、和边框颜色。 DIV{border:5pt solid #ff0000;}
width 设定标记元素的宽度。
height 设定标记元素的高度。
float 设定标记元素与文字间的相对位置(文字绕排方式)。取值:
none:以默认方式显示;
left:标记元素靠左,文字在右边绕排;
right:标记元素靠右,文字在左边绕排;
clear 设定标记元素与文字间的相对位置(与float不同的是标记元素两边都不绕排)。取值:
none:以默认方式显示;
left:标记元素靠左,右边无文字绕排;
right:标记元素靠右,左边无文字绕排;
其他类
z-index 设定标记元素的堆叠层次,取值为整数,也可以是负数,数值大的在上层。
visibility 设定标记元素是否可见,取值有:
inherit:取默认值 visible:可见 hidden:不可见(隐藏)


 

精彩评论19

正序浏览
ffuip 发表于 2014-10-11 16:33:30 | 显示全部楼层
 
感谢党和人民的关爱~~~
 
kbcesuo 发表于 2014-10-11 16:45:18 | 显示全部楼层
 
不为楼主的标题所吸引,也不是被贴子的内容所迷惑。
 
uhxidjjr 发表于 2014-10-11 16:57:40 | 显示全部楼层
 
哥们,给我做个链接吧
 
xiaoye 发表于 2014-10-11 17:08:20 | 显示全部楼层
 
不错的东西 持续关注
 
kwjvtwzx 发表于 2014-10-25 12:58:34 | 显示全部楼层
 
希望这样的好贴多些,再多些!!!
 
efiew 发表于 2014-10-25 12:58:45 | 显示全部楼层
 
呵呵 哪天得看看 `~~~~
 
inhidgehila 发表于 2014-10-25 13:03:10 | 显示全部楼层
 
哈哈 小心被她看见哦~~~~
 
ffuip 发表于 2014-10-25 13:28:49 | 显示全部楼层
 
苍天之下,厚土之上,竟有如此奇人异士、文人墨客!讥讽于谈笑间,笑骂于无形中,层次之高,境界之深,非我等所能匹及,偶像啊!
 
oxdbw 发表于 2014-10-25 13:35:28 | 显示全部楼层
 
还没崇拜过谁呢,满足一下愿望吧,谢谢!
 
jckie 发表于 2014-10-31 14:17:15 | 显示全部楼层
 
只是本着“看贴(虽然看不懂)回贴,利人利己的中华民族优秀传统美德”,顺便赚点积分。
 
xiaoye 发表于 2014-10-31 14:20:55 | 显示全部楼层
 
朕在自己的寝宫~~~~
 
kbcesuo 发表于 2014-10-31 14:28:18 | 显示全部楼层
 
要睡觉了 呵呵
 
ffuip 发表于 2014-10-31 14:42:52 | 显示全部楼层
 
呵呵 大家好奇嘛 来观看下~~~~
 
xiaoye 发表于 2014-10-31 14:44:27 | 显示全部楼层
 
你可是难得来坐坐啊~~~
 
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则


5关注

1粉丝

19258帖子

热门图文
热门帖子
排行榜
作者专栏

关注我们:微信订阅号

官方微信

APP下载

全国服务Q Q:

956130084

中国·湖北

Email:956130084@qq.com

Copyright   ©2015-2022  站长技术交流论坛|互联网技术交流平台Powered by©Discuz!技术支持:得知网络  

鄂公网安备 42018502006730号

  ( 鄂ICP备15006301号-5 )