CSS属性合写

animation:[[ animation-name ] || [ animation-duration ] || [ animation-timing-function ] || [ animation-delay ] || [ animation-iteration-count ] || [ animation-direction ]]

[ animation-name ]: 检索或设置对象所应用的动画名称

[ animation-duration ]: 检索或设置对象动画的持续时间

[ animation-timing-function ]: 检索或设置对象动画的过渡类型

[ animation-delay ]: 检索或设置对象动画延迟的时间

[ animation-iteration-count ]: 检索或设置对象动画的循环次数

[ animation-direction ]: 检索或设置对象动画在循环中是否反向运动

transform:none | matrix(<number>,<number>,<number>,<number>,<number>,<number>)? translate(<length>[,<length>])? translateX(<length>)? translateY(<length>)? rotate(<angle>)? scale(<number>[,<number>])? scaleX(<number>)? scaleY(<number>)? skew(<angle>[,<angle>])? skewX(<angle>) || skewY(<angle>)

none: 无转换

matrix: 以一个含六值的(a,b,c,d,e,f)变换矩阵的形式指定一个2D变换,相当于直接应用一个[a,b,c,d,e,f]变换矩阵

translate(<length>[, <length>]): 指定对象的2D translation(2D平移)。第一个参数对应X轴,第二个参数对应Y轴。如果第二个参数未提供,则默认值为0

translateX(<length>): 指定对象X轴(水平方向)的平移

translateY(<length>): 指定对象Y轴(垂直方向)的平移

rotate(<angle>): 指定对象的2D rotation(2D旋转),需先有transform-origin属性的定义

scale(<number>[, <number>]): 指定对象的2D scale(2D缩放)。第一个参数对应X轴,第二个参数对应Y轴。如果第二个参数未提供,则默认取第一个参数的值

scaleX(<number>): 指定对象X轴的(水平方向)缩放

scaleY(<number>): 指定对象Y轴的(垂直方向)缩放

skew(<angle> [, <angle>]): 指定对象skew transformation(斜切扭曲)。第一个参数对应X轴,第二个参数对应Y轴。如果第二个参数未提供,则默认值为0

skewX(<angle>): 指定对象X轴的(水平方向)扭曲

skewY(<angle>): 指定对象Y轴的(垂直方向)扭曲

transition:[ transition-property ] || [ transition-duration ] || [ transition-timing-function ] || [ transition-delay ]

[ transition-property ]: 检索或设置对象中的参与过渡的属性

[ transition-duration ]: 检索或设置对象过渡的持续时间

[ transition-timing-function ]: 检索或设置对象中过渡的动画类型

[ transition-delay ]: 检索或设置对象延迟过渡的时间

columns:[ column-width ] || [ column-count ]

[ column-width ]: 设置或检索对象每列的宽度

[ column-count ]: 设置或检索对象的列数

border:[ border-width ] || [ border-style ] || [ border-color ]  //经过测试,border-style与border-color互换位置也可

[ border-width ]: 设置或检索对象边框宽度。

[ border-style ]: 设置或检索对象边框样式。

[ border-color ]: 设置或检索对象边框颜色。

font:[ [ <font-style> || <font-variant> || <font-weight> ]? <font-size> [ / <line-height> ]? <font-family> ] | caption | icon | menu | message-box | small-caption | status-bar

<font-style>:指定文本字体样式

<font-variant>:指定文本是否为小型的大写字母

<font-weight>: 指定文本字体的粗细

<font-size>: 指定文本字体尺寸

<line-height>: 指定文本字体的行高

<font-family>: 指定文本使用某个字体或字体序列

caption: 使用有标题的系统控件的文本字体(如按钮,菜单等)(CSS2)

icon: 使用图标标签的字体(CSS2)

menu: 使用菜单的字体(CSS2)

message-box: 使用信息对话框的文本字体(CSS2)

small-caption: 使用小控件的字体(CSS2)

status-bar: 使用窗口状态栏的字体(CSS2)

background:[ <bg-layer>, ]* <final-bg-layer>

<bg-layer> = [ background-image ] || [ background-position ] [ / background-size ]? || [ background-repeat ] || [ background-attachment ] || [ [ background-origin ] || [ background-clip ] ]{1,2}

<final-bg-layer> = [ background-color ] || [ background-image ] || [ background-position ] [ / background-size ]? || [ background-repeat ] || [ background-attachment ] || [ [ background-origin ] || [ background-clip ] ]{1,2}

//经过测试,background-position放在background-repeat之后也可

[ background-color ]: 指定对象的背景颜色。

[ background-image ]: 指定对象的背景图像。可以是真实图片路径或使用渐变创建的“背景图像”

[ background-repeat ]: 指定对象的背景图像如何铺排填充。

[ background-attachment ]: 指定对象的背景图像是随对象内容滚动还是固定的。

[ background-position ]: 指定对象的背景图像位置。

[ background-origin ]: 指定对象的背景图像显示的原点。

[ background-clip ]: 指定对象的背景图像向外裁剪的区域。

[ background-size ]: 指定对象的背景图像的尺寸大小。

margin:[ <length> | <percentage> | auto ]{1,4}

auto:值被设置为相对边的值

<length>: 用长度值来定义外补白。可以为负值

<percentage>: 用百分比来定义外补白。可以为负值

检索或设置对象四边的外延边距。

  • 如果提供全部四个参数值,将按上、右、下、左的顺序作用于四边。
  • 如果只提供一个,将用于全部的四边。
  • 如果提供两个,第一个用于上、下,第二个用于左、右。
  • 如果提供三个,第一个用于上,第二个用于左、右,第三个用于下。
  • 内联对象可以使用该属性设置左、右两边的外补丁;若要设置上、下两边的外补丁,必须先使该对象表现为块级或内联块级。
  • 外延边距始终透明。

padding同理

list-style:[ list-style-image ] || [ list-style-position ] || [ list-style-type ]  //ps:经测试属性值的顺序不影响最终效果

[ list-style-image ]: 设置或检索作为对象的列表项标记的图像

[ list-style-position ]: 设置或检索作为对象的列表项标记如何根据文本排列

[ list-style-type ]: 设置或检索对象的列表项所使用的预设标记

原文地址:https://www.cnblogs.com/598869621zzm/p/3382319.html