Types of
box-shadow:CSS3 standard attributes,May be separated by commas more shadow attributes
-moz-box-shadow:Early Firefox for displaying the shadow properties
-webkit-box-shadow:Early Chrome、Safari to display the shadow properties
grammar
1 2 3 4 5 6 7 |
box-shadow: none | <shadow> [,<shadow>]* where <shadow> is defined as: inset? && [ <offset-x> <offset-y> <blur-radius>? <spread-radius>? <color>? ] /*其中offset的xy是x和y轴偏移度,blur是模糊程度,spread是延展度,color则是颜色值*/ |
Example
1 2 3 4 5 6 |
-webkit-box-shadow: 1px 1px 5px #F9FFF9; -moz-box-shadow: 1px 1px 5px #F9FFF9; box-shadow: 1px 1px 5px #F9FFF9; /*比如说我要设置XY轴各偏1px,模糊为5其他默认颜色为#F9FFF9的阴影,*/ /*那么就在句子当中加入上边的代码*/ |
compatibility
For now the mainstream browsers,For example FF4.0 +、Chrome10.0+、Opera10.5+、Safari5.1+、IE9.0+,AllDirect SupportCSS3 standard attributesbox-shadow
But if you want an early version supports such Firefox4.0 previous shadow,So you want to use the property -moz-box-shadow,This is an early FF own custom CSS properties。
Another example is less than 10.0 or less than 5.1 Safari Chrome will use -webkit-box-shadow property,Otherwise, it will not see the shadows。
Original article written by LogStudio:R0uter's Blog » The shadow CSS property box-shadow
Reproduced Please keep the source and description link:https://www.logcg.com/archives/569.html