CSS1提供有關字型、顏色、位置和文字屬性的基本資訊,該版本已經得到了目前解析HTML和XML的瀏覽器的廣泛支援。
讓程式設計師開發時可以不考慮顯示和介面就可以製作表單和介面,顯示問題可由美工或是程式設計師後期再來編寫相應的 CSS2.0樣式來解決。
list-style-type
disc circle square decimal decimal-leading-zero lower-roman upper-roman lower-greek lower-alpha lower-latin upper-alpha upper-latin _qdzhj.com_ hebrew armenian georgian cjk-ideographic hiragana katakana hiragana-iroha katakana-iroha none inherit
margin
收藏
檢視我的收藏
51有用+1
17
CSS2
編輯
CSS2.0提供給我們了一個機制,讓程式設計師開發時可以不考慮顯示和介面就可以製作表單和介面,顯示問題可由美工或是程式設計師後期再來編寫相應的 CSS2.0樣式來解決。不過由於CSS2.0目前尚未見過很好的編輯軟體,所以無法做到所見即所得,編寫起來不易。
目錄
1CSS2簡介
2CSS2單位
相對長度單位
絕對長度單位
顏色單位
角度單位
時間單位
頻率單位
3CSS2標準屬性
1CSS2簡介編輯
樣式單自從CSS1的版本之後,又在1998年5月釋出了CSS2版本,樣式單得到了更多的充實。
CSS2.0是一套全新的樣式表結構,_qdzhj.com_是由W3C推行的,同以往的CSS1.0或CSS1.2完全不一樣,CSS2.0推薦的是一套內容和表現效果分離的方式,HTML元素可以通過CSS2.0的樣式控制顯示效果,可完全不使用以往HTML中的table和td來定位表單的外觀和樣式,只需使用div和 Li此類HTML標籤來分割元素,之後即可通過CSS2.0樣式來定義表單介面的外觀。
2CSS2單位編輯
相對長度單位
em ex px
絕對長度單位
pt pc in cm mm
顏色單位
rgb(R,G,B) #RRGGBB Color Name
角度單位
deg grad rad
時間單位
s ms
頻率單位
kHz Hz
3CSS2標準屬性編輯
屬性
取值
(本列及後列連結源為W3C)
初值
適用於
(預設所有)
繼承性
百分比
(預設N/A)
媒體
azimuth
center
yes
aural
background
[background-color background-image _yuzhishiye.com_ background-repeat background-attachment background-position] inherit
XX
no
allowed on 'background-position'
visual
background-attachment
scroll fixed inherit
scroll
no
visual
background-color
transparent
no
visual
background-image
none
no
visual
background-position
[ [
0% 0%
block-level and replaced elements
no
refer to the size of the box itself
visual
background-repeat
repeat repeat-x repeat-y no-repeat inherit
repeat
no
visual
border
[ border-width border-style
see individual properties
no
visual
border-collapse
collapse separate inherit
collapse
'table' and 'inline-table' elements
yes
visual
border-color
see individual properties
no
visual
border-spacing
0
'table' and 'inline-table' elements
yes
visual
border-style
see individual properties
no
visual
border-top border-right border-bottom border-left
[ border-top-width border-style
see individual properties
no
visual
border-top-color border-right-color border-bottom-color border-left-color
the value of the 'color' property
no
visual
border-top-style border-right-style border-bottom-style border-left-style
none
no
visual
border-top-width border-right-width border-bottom-width border-left-width
medium
no
visual
border-width
see individual properties
no
visual
bottom
auto
positioned elements
no
refer to height of containing block
visual
caption-side
top bottom left right inherit
top
'table-caption' elements
yes
visual
clear
none left right both inherit
none
block-level elements
no
visual
clip
auto
block-level and replaced elements
no
visual
color
depends on user agent
yes
visual
content
[
empty string
:before and :after pseudo-elements
no
all
counter-increment
[
none
no
all
counter-reset
[
none
no
all
cue
[ cue-before cue-after ] inherit
XX
no
aural
cue-after
none
no
aural
cue-before
none
no
aural
cursor
[ [
auto
yes
visual, interactive
direction
ltr rtl inherit
ltr
all elements, but see prose
yes
visual
display
inline block list-item run-in compact marker table inline-table table-row-group table-header-group table-footer-group table-row table-column-group table-column table-cell table-caption none inherit
inline
no
all
elevation
level
yes
aural
empty-cells
show hide inherit
show
'table-cell' elements
yes
visual
float
left right none inherit
none
all but positioned elements and generated content
no
visual
font
[ [ font-style font-variant font-weight ]? font-size [ / line-height ]? font-family ] caption icon menu message-box small-caption status-bar inherit
see individual properties
yes
allowed on 'font-size' and 'line-height'
visual
font-family
[[
depends on user agent
yes
visual
font-size
medium
yes, the computed value is inherited
refer to parent element's font size
visual
font-size-adjust
none
yes
visual
font-stretch
normal wider narrower ultra-condensed extra-condensed condensed semi-condensed semi-expanded expanded extra-expanded ultra-expanded inherit
normal
yes
visual
font-style
normal italic oblique inherit
normal
yes
visual
font-variant
normal small-caps inherit
normal
yes
visual
font-weight
normal bold bolder lighter 100 、 200 300、 400 、 500、 600 700 、 800 900 inherit
normal
yes
visual
height
auto
all elements but non-replaced inline elements, table columns, and column groups
no
see prose
visual
left
auto
positioned elements
no
refer to width of containing block
visual
letter-spacing
normal
normal
yes
visual
line-height
normal
normal
yes
refer to the font size of the element itself
visual
list-style
[ list-style-type list-style-position list-style-image ] inherit
XX
elements with 'display: list-item'
yes
visual
list-style-image
none
elements with 'display: list-item'
yes
visual
list-style-position
inside outside inherit
outside
elements with 'display: list-item'
yes
visual
list-style-type
disc circle square decimal decimal-leading-zero lower-roman upper-roman lower-greek lower-alpha lower-latin upper-alpha upper-latin hebrew armenian georgian cjk-ideographic hiragana katakana hiragana-iroha katakana-iroha none inherit
disc
elements with 'display: list-item'
yes
visual
margin
XX
no
refer to width of containing block
visual
margin-top margin-right margin-bottom_6789w.net_ margin-left
0
no
refer to width of containing block
visual
marker-offset
auto
elements with 'display: marker'
no
visual
marks
[ crop cross ] none inherit
none
page context
N/A
visual, paged
max-height
max-width
CSS3語言開發是朝著模組化發展的。以前的規範作為一個模組實在是太龐大而且比較複雜,所以,把它分解為一些小的模組,更多新的模組也被加入進來。
左邊這個佈局複雜的三欄網頁來說,如果使用CSS3Grid佈局的話,我們只需這樣寫:
body{columns:3;column-gap:0.5in;}
img{float:pagetopright;width:3gr;}
border-color:
border-top-color:
border-right-color:
border-bottom-color:
border-left-color: