验证错误“值错误:背景位置太多值或值不是”怎么解决?

发布于 2024-08-30 16:47:15 字数 3199 浏览 8 评论 0原文

为什么验证返回此错误。如何解决呢?

ul#navigation li#navigation-3 a.current      

值错误:背景位置太 许多价值观或价值观不是 识别:-164px -164px -36px -164px -164px -36px

这是错误屏幕。

替代文本 http://shup.com/Shup/321632/110323115458-My-桌面.png

CSS

ul#navigation { height: 36px; left: 300px; list-style-image: none; list-style-position: outside; list-style-type: none; position: relative; top: 74px; width: 603px; }

ul#navigation li { display: inline; }

ul#navigation li a { height: 36px; float: left; text-decoration: none;  }

ul#navigation li a:link, ul#navigation li a:visited {font-family:Arial; color:#595959; font-size:1.1em; font-weight:bold }

ul#navigation li a:hover, ul#navigation li a:active {color:#404040}

ul#navigation li a span { display:block;
float:left;
padding-left:8px;
padding-top:14px;}

ul#navigation li#navigation-1 a { width: 53px; background: url(../images/menu-sprite.jpg) no-repeat 0px 0; }


ul#navigation li#navigation-1 a:active, ul#navigation li#navigation-1 a:hover { background-position: 0px -36px; }

ul#navigation li#navigation-1 a.current { background-position: 0px 0px -36px; }

ul#navigation li#navigation-2 a { width: 111px; background: url(../images/menu-sprite.jpg) no-repeat -53px 0; }

ul#navigation li#navigation-2 a:active, ul#navigation li#navigation-2 a:hover { background-position: -53px -36px; }

ul#navigation li#navigation-2 a.current { background-position: -53px -53px -36px; }

ul#navigation li#navigation-3 a { width: 78px; background: url(../images/menu-sprite.jpg) no-repeat -164px 0; }

ul#navigation li#navigation-3 a:active, ul#navigation li#navigation-3 a:hover { background-position: -164px -36px; }

ul#navigation li#navigation-3 a.current { background-position: -164px -164px -36px; }

ul#navigation li#navigation-4 a { width: 100px; background: url(../images/menu-sprite.jpg) no-repeat -242px 0; }

ul#navigation li#navigation-4 a:active, ul#navigation li#navigation-4 a:hover { background-position: -242px -36px; }

ul#navigation li#navigation-4 a.current { background-position: -242px -242px -36px; }

ul#navigation li#navigation-5 a { width: 88px; background: url(../images/menu-sprite.jpg) no-repeat -342px 0; }

ul#navigation li#navigation-5 a:active, ul#navigation li#navigation-5 a:hover { background-position: -342px -36px; }

ul#navigation li#navigation-5 a.current { background-position: -342px -342px -36px; }

ul#navigation li#navigation-6 a { width: 96px; background: url(../images/menu-sprite.jpg) no-repeat -430px 0; }

ul#navigation li#navigation-6 a:active, ul#navigation li#navigation-6 a:hover { background-position: -430px -36px; }

ul#navigation li#navigation-6 a.current { background-position: -430px -430px -36px; }

ul#navigation li#navigation-7 a { width: 77px; background: url(../images/menu-sprite.jpg) no-repeat -526px 0; }

ul#navigation li#navigation-7 a:active, ul#navigation li#navigation-7 a:hover { background-position: -526px -36px; }

ul#navigation li#navigation-7 a.current { background-position: -526px -526px -36px; }

Why is the validation returning this error. How to resolve it?

ul#navigation li#navigation-3 a.current      

Value Error : background-position Too
many values or values are not
recognized : -164px -164px -36px
-164px -164px -36px

This is the error screen.

alt text http://shup.com/Shup/321632/110323115458-My-Desktop.png

CSS

ul#navigation { height: 36px; left: 300px; list-style-image: none; list-style-position: outside; list-style-type: none; position: relative; top: 74px; width: 603px; }

ul#navigation li { display: inline; }

ul#navigation li a { height: 36px; float: left; text-decoration: none;  }

ul#navigation li a:link, ul#navigation li a:visited {font-family:Arial; color:#595959; font-size:1.1em; font-weight:bold }

ul#navigation li a:hover, ul#navigation li a:active {color:#404040}

ul#navigation li a span { display:block;
float:left;
padding-left:8px;
padding-top:14px;}

ul#navigation li#navigation-1 a { width: 53px; background: url(../images/menu-sprite.jpg) no-repeat 0px 0; }


ul#navigation li#navigation-1 a:active, ul#navigation li#navigation-1 a:hover { background-position: 0px -36px; }

ul#navigation li#navigation-1 a.current { background-position: 0px 0px -36px; }

ul#navigation li#navigation-2 a { width: 111px; background: url(../images/menu-sprite.jpg) no-repeat -53px 0; }

ul#navigation li#navigation-2 a:active, ul#navigation li#navigation-2 a:hover { background-position: -53px -36px; }

ul#navigation li#navigation-2 a.current { background-position: -53px -53px -36px; }

ul#navigation li#navigation-3 a { width: 78px; background: url(../images/menu-sprite.jpg) no-repeat -164px 0; }

ul#navigation li#navigation-3 a:active, ul#navigation li#navigation-3 a:hover { background-position: -164px -36px; }

ul#navigation li#navigation-3 a.current { background-position: -164px -164px -36px; }

ul#navigation li#navigation-4 a { width: 100px; background: url(../images/menu-sprite.jpg) no-repeat -242px 0; }

ul#navigation li#navigation-4 a:active, ul#navigation li#navigation-4 a:hover { background-position: -242px -36px; }

ul#navigation li#navigation-4 a.current { background-position: -242px -242px -36px; }

ul#navigation li#navigation-5 a { width: 88px; background: url(../images/menu-sprite.jpg) no-repeat -342px 0; }

ul#navigation li#navigation-5 a:active, ul#navigation li#navigation-5 a:hover { background-position: -342px -36px; }

ul#navigation li#navigation-5 a.current { background-position: -342px -342px -36px; }

ul#navigation li#navigation-6 a { width: 96px; background: url(../images/menu-sprite.jpg) no-repeat -430px 0; }

ul#navigation li#navigation-6 a:active, ul#navigation li#navigation-6 a:hover { background-position: -430px -36px; }

ul#navigation li#navigation-6 a.current { background-position: -430px -430px -36px; }

ul#navigation li#navigation-7 a { width: 77px; background: url(../images/menu-sprite.jpg) no-repeat -526px 0; }

ul#navigation li#navigation-7 a:active, ul#navigation li#navigation-7 a:hover { background-position: -526px -36px; }

ul#navigation li#navigation-7 a.current { background-position: -526px -526px -36px; }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

烈酒灼喉 2024-09-06 16:47:15

你有这样的情况:

ul#navigation li#navigation-3 a.current { background-position: -164px -164px -36px; }

定位背景只需要两个值,去掉一个值就应该验证。

更新:您的所有当前选择器上都有这个,从所有选择器中删除第三个值就可以了。

You have this:

ul#navigation li#navigation-3 a.current { background-position: -164px -164px -36px; }

There are only two values needed to position a background, get rid of one and it should validate.

Update: you have this on all of your current selectors, remove the third value from all and it will be fine.

自由如风 2024-09-06 16:47:15

Background-position 获取 2 个值而不是 3 个。
参见此处

Background-position gets 2 values not 3.
See here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文