W3 VALID跨浏览器css渐变, [英] W3 VALID cross browser css gradient,

查看:185
本文介绍了W3 VALID跨浏览器css渐变,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到html条件语句,以便我可以引用所需的额外的.css文件。 Opera,Ie8,Safari。

I am trying to find html conditional statement so that I can reference the required additional .css file. Opera, Ie8, Safari.

我使用的是:

background: -moz-linear-gradient(#ADD58A, #FFFFFF);

但是有其他浏览器css属性会导致W3 css验证失败!

for Firefox which is great. But having other browser css properties causes W3 css validation to fail!

我相信html条件语句可以用有效的代码。

I believe with html conditional statements this can be done with valid code.

在回复之前,是的,我已经看过馅饼,我没有验证的三个绿色滴答,当使用饼,因此想使用html条件,而不是具有浏览器的下降样式。 p>

Before you reply, yes I have looked at pie, i do not have the 3 green ticks of validation when using pie, hence wanting to use html conditional rather than having the browser 'drop' styles.

推荐答案

拼图CSS3验证器应该有一个选项来触发警告,而不是供应商扩展上的错误。假设你没有使用任何其他非标准样式,你的CSS应该传递一个绿色,虽然有几个警告,但没有更多。

The Jigsaw CSS3 validator should have an option for triggering warnings instead of errors on vendor extensions. Assuming you haven't used any other non-standard styles, your CSS should pass with a green, albeit with a few warnings, but nothing more.

至于为什么Daniel A. White说不要担心验证,W3C有效的跨浏览器CSS3是一个矛盾。在2011年,你根本无法实现这样的事情与大多数CSS3功能。

As to why Daniel A. White says not to worry about validation, well, "W3C valid cross-browser CSS3" is an oxymoron. In 2011 you simply can't achieve such a thing with most CSS3 features yet.

是的,验证您的代码,以实现最大的跨浏览器互操作性。但在现实世界中,这只适用于CSS2的东西,现在。当谈到CSS3功能,其中规范本身尚未完成,更不用说浏览器的实现(然而他们解释不完整的规范),有效性还没有意义。 border-radius 可能会工作,如果你忽略不太新近的(我不会说较旧的)大多数现代浏览器的版本,因为每个主要浏览器的最新版本现在支持官方属性名,但是世界上没有人实现任何CSS渐变的无扩展版本。

Yes, validate your code for maximal cross-browser interoperability. But in the real world, that's only applicable to CSS2 stuff right now. When it comes to CSS3 features where the spec itself isn't yet finalized, let alone browsers' implementations (however they interpret the incomplete spec), validity doesn't make sense yet. Things like border-radius may work if you ignore less recent (I wouldn't say older) versions of most modern browsers, since the latest versions of every major browser now support the official property name, but nobody in the world has implemented the extensionless versions of any CSS gradients yet.

您可以告诉他们只在验证器中触发警告, 肛门,你甚至不想要警告,也许等到明年。希望事情将是足够稳定,主要的浏览器将删除其CSS3渐变的前缀。

You can tell them to trigger only warnings in the validator, or if you're so anal that you don't even want warnings, perhaps wait until next year. Hopefully things will be stable enough and major browsers will have dropped their prefixes for CSS3 gradients.

这篇关于W3 VALID跨浏览器css渐变,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆