首页 > WEB开发 > CSS

box-shadow[css3.0参考手册]

 

语法:

box-shadow<length> <length> <length> <length> || <color>

相关属性:text-shadow

取值:

<length> <length> <length>? <length>? || <color>
阴影水平偏移值(可取正负值);阴影垂直偏移值(可取正负值);阴影模糊值;阴影颜色

说明:

设置块阴影

引擎类型 Gecko Webkit Presto
Box-shadow -moz-box-shadow -webkit-border-shadow  
       

兼容性:

类型 IEInternet Explorer FirefoxFirefox ChromeChrome OperaOpera SafariSafari
版本 (×)IE6 (×)Firefox 3.0.10 (√)Chrome 2.0.x (×)Opera 9.64 (√)Safari 4
(×)IE7 (√)Firefox 3.5      
(×)IE8        
         

示例:

border-shadow

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="utf-8" />
<meta name="robots" content="all" />
<meta name="author" content="Tencent-ISRD" />
<meta name="Copyright" content="Tencent" />
<title>box-shadow</title>
</head>
<body>
<div style="background-color: #81BCFF;border-radius: 5px;padding: 10px;box-shadow: 1px 2px 6px #000;-webkit-box-shadow:1px 2px 6px #000;-moz-box-shadow:1px 2px 6px #000;">Safari下可以看到效果</div>

 

 

来源://作者:/更新时间:2012-11-09
相关文章
评论:
验证码:
匿名评论: