【发布时间】:2012-01-28 16:38:38
【问题描述】:
有人能告诉我为什么下面的 css 没有验证吗?我一直在尝试自己研究这个,但没有运气。我读过的所有文档都说这是在 css3 中做渐变的正确原因。
#header {
color: white;
font-size: 12px;
font-family: Helvetica, Verdana, Arial, sans-serif;
background: black;
background: -moz-linear-gradient(top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0.65)), color-stop(100%,rgba(0,0,0,0)));
background: -webkit-linear-gradient(top, rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 100%);
background: -o-linear-gradient(top, rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 100%);
background: -ms-linear-gradient(top, rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 100%);
background: linear-gradient(top, rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 100%);
width: 100%;
height: 35px;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
padding: 10px;
position: fixed;
top: 0px;
z-index: 1000;
}
这些是我得到的验证错误:
TextArea 的 W3C CSS 验证器结果(CSS 级别 3)
对不起!我们发现了以下错误(6)
URI:文本区域
6 #header 值错误:背景颜色 -moz-linear-gradient(top,rgba(0,0,0,0.65 ) 0%,rgba(0,0,0,0 ) 100% ) 不是背景颜色值: -moz-linear-gradient(top,rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 100%)
7 #header 值错误:背景颜色 -webkit-gradient(linear,left 上,左下,颜色停止(0%,rgba(0,0,0,0.65) ),color-stop(100%,rgba(0,0,0,0 ) ) ) 不是背景颜色值: -webkit-渐变(线性,左上,左下,颜色停止(0%,rgba(0,0,0,0.65)),颜色停止(100%,rgba(0,0,0,0 ) ) )
8 #header 值错误:背景颜色 -webkit-linear-gradient(top,rgba(0,0,0,0.65 ) 0%,rgba(0,0,0,0 ) 100% ) 不是背景颜色值: -webkit-linear-gradient(top,rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 100%)
9 #header 值错误:背景颜色 -o-linear-gradient(top,rgba(0,0,0,0.65 ) 0%,rgba(0,0,0,0 ) 100% ) 不是背景颜色值:-o-linear-gradient(顶部,RGBA(0,0,0,0.65 ) 0%,rgba(0,0,0,0 ) 100% )
10 #header 值错误:背景颜色 -ms-linear-gradient(top,rgba(0,0,0,0.65 ) 0%,rgba(0,0,0,0) 100% ) 不是背景颜色值:-ms-linear-gradient(顶部,RGBA(0,0,0,0.65 ) 0%,rgba(0,0,0,0 ) 100% )
11 #header 值错误:背景颜色 线性梯度(顶部,rgba(0,0,0,0.65)0%,rgba(0,0,0,0)100%)不是 背景颜色值:线性渐变(顶部,rgba(0,0,0,0.65) 0%,rgba(0,0,0,0 ) 100% )
【问题讨论】:
标签: validation css background gradient