更多>>網頁設計 Blog
來源:一度好 時間:2013-09-27 閱讀:3333
CSS層疊樣式表屬性及樣式文件和JS文件的調用
CSS層疊樣式表屬性 |
||
(一)“類型”選項卡 |
||
屬性名稱 |
屬性值 |
屬性說明 |
font-family |
宋體,華文行楷 |
字體 |
font-size |
14pt |
字號 |
font-weight |
bold |
加粗 |
font-style |
italic |
斜體 |
color |
#9900000 |
文本顏色 |
text-decoration |
underline,overline,line-through,none |
修飾線 |
(二)“背景”選項卡 |
||
屬性名稱 |
屬性值 |
屬性說明 |
background-color |
#ff0000 |
背景顏色 |
background-image |
url(images/img.jpg) |
背景圖像 |
background-repeat |
none,repeat,repeat-x,repeat-y |
背景重復 |
background-attachment |
fixed,scroll |
背景附件 |
background-position |
center,center |
背景定位 |
(三)“區塊”選項卡 |
||
屬性名稱 |
屬性值 |
屬性說明 |
text-align |
left,center,right,justify |
文本對齊 |
text-indent |
20px |
文本縮進 |
display |
block |
文本顯示方式 |
letter-spacing |
10em |
字母間距 |
word-spacing |
10em |
單詞間距 |
vertical-align |
top,middle,bottom |
垂直對齊 |
(四)“方框”選項卡 |
||
屬性名稱 |
屬性值 |
屬性說明 |
width |
780px |
方框寬度 |
height |
120px |
方框高度 |
padding |
0px |
填充 |
padding-top |
0px |
頂填充 |
padding-right |
0px |
右填充 |
padding-bottom |
0px |
下填充 |
padding-left |
0px |
左填充 |
margin |
0px |
邊界 |
margin-top |
0px |
上邊界 |
margin-right |
0px |
右邊界 |
margin-bottom |
0px |
下邊界 |
margin-left |
0px |
左邊界 |
float |
left,right,none |
浮動 |
clear |
left,right,both,none |
清除 |
(五)“邊框”選項卡 |
||
屬性名稱 |
屬性值 |
屬性說明 |
border |
1px solid #ff0000 |
四個邊線一樣 |
border-top-width |
1px |
上邊線寬度 |
border-top-style |
solid,dashed |
上邊線線型 |
border-top-color |
#ff0000 |
上邊線顏色 |
(六)“列表”選項卡 |
||
屬性名稱 |
屬性值 |
屬性說明 |
list-style-type |
none,disc,circle,square |
列表樣式類型 |
list-style-image |
url(images/img.jpg) |
列表樣式圖片 |
list-style-position |
inside,outside |
列表樣式定位 |
(七)“定位”選項卡 |
||
屬性名稱 |
屬性值 |
屬性說明 |
width |
數值 |
方框寬度 |
height |
數值 |
方框高度 |
position |
fixed(固定),absolute(絕對),relative(相對),statuc(靜態) |
定位類型 |
visibility |
visible(可見),hidden(隱藏),inherit(繼承) |
可見性 |
overflow |
scroll,hidden,visible,auto,inherit |
溢出 |
z-index |
auto,inherit |
Z軸 |
left |
數值 |
窗口左邊距 |
top |
數值 |
窗口頂邊距 |
right |
數值 |
窗口右邊距 |
bottom |
數值 |
窗口底邊距 |
clip |
rect(20px,20px,10px,0px); |
裁切 |
(八)“擴展”選項卡 |
||
屬性名稱 |
屬性值 |
屬性說明 |
cursor |
hand|text|wait|default|move|help |
光標類型 |
(九)鏈接外部樣式表文件 |
||
<link href="mystyle.css" rel="stylesheet" type="text/css"> |
||
(十)鏈接外部JavaScript文件 |
||
<script language="javascript" href="mystyle.js" type="text/javascript"></script> |
評論列表 |
暫時沒有相關記錄
|
發表評論