CSS常用关键字汇总

CSS常用关键字汇总

字号: font-size: 20px

字体风格: font-style: italic

字重: font-weight: bold

文字变形: text-transform: uppercase/lowercase/capitalize/none

文字修饰: text-decoration: underline/overline/line-through/blink/none

字间距: word-spacing: 1em

字母间距: letter-spacing: 10px

行高: line-height: 16pt

文字对齐:text-align: center

垂直对齐: vertical-align: top

文字缩行: text-indent: 2em

顶边距、底边距、左边距和右边距:  margin-top: 20px; margin-bottom: 5px; margin-left: 100px;

margin-right: 55px

顶空格填充,底空格填充,左空格填充和右空格填充:padding-top: 20px; padding-bottom: 5px;

padding-left: 100px; padding-right: 55px

顶边框宽度,底边框宽度,左边框宽度和右边框宽度: border-top-width: 2px; border-bottom-

width: 5px; border-left-width: 1px; border-right-width: 1px

边框颜色:border-color: green;

边框样式: border-style: double/solid/dotted/dashed/groove/ridge/inset/outset

浮动: float: left (浮动属性使你能将一个要素周围用文字包裹,不仅仅是包裹图象,而且能包裹整

块的文字)

清除: clear: left (如果你想使一段文字包裹某一要素,而下一段文字不包裹,你可以使用clear属性

)

背景色: background-color: #FFFF66

背景图象: background-image

背景重复: background-repeat: no-repeat

固定背景: background-attachment: fixed

背景定位: background-position: center bottom;

背景: background: url(background.gif) #CCFFCC repeat-y top right

定位: position: absolute/relative; left: 100px; top: 43px

可见性: visibility: hidden/visible/inherit

重叠: z-index: 10  

CSS常用关键字汇总

相关文章:

你感兴趣的文章:

标签云: