我可以在 HTML5 和 CSS3 中自由使用什么?我应该避免哪些功能?

发布于 2024-12-18 13:41:00 字数 62 浏览 0 评论 0原文

我可以在 HTML5 和 CSS3 中使用哪些功能,而无需过多考虑 IE6 和类似的功能?我应该避免哪些功能?

What features can I use in HTML5 and CSS3 without thinking too much about IE6 and similar? What features should I avoid?

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

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

发布评论

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

评论(7

快乐很简单 2024-12-25 13:41:00

我可以在 HTML5 和 CSS3 中使用哪些功能,而无需过多考虑 IE6 和类似版本?

定义“太多”。 HTML 4 和 CSS 1 中的任何内容都会构成非常安全的基线……

更实际的说明 caniuse 会告诉您什么时候添加了对特定功能的支持。然后您需要决定它是否会完全降解。

也就是说,不要去寻找要使用的 HTML 5 / CSS 3 / 等功能。如果您遇到问题,请寻找解决方案。不要寻找解决方案,然后尝试找到问题来解决它。

What features can I use in HTML5 and CSS3 without thinking too much about IE6 and similar?

Define "too much". Anything that is in HTML 4 and CSS 1 makes for a very safe baseline…

On a more practical note caniuse will tell you when support for a particular feature has been added. You then need to decide if it will degrade cleanly or not.

That said, don't go looking HTML 5 / CSS 3 / etc features to use. If you have a problem, look for a solution. Don't look for a solution and then try a find a problem to solve with it.

层林尽染 2024-12-25 13:41:00

当您想要使用某个特定功能时,http://www.caniuse.com/ 是一个很好的资源- 但不确定浏览器兼容性。

此外,许多 HTML5/CSS3 功能都有附加链接,其中包含有关我可以使用的更多信息。

http://www.caniuse.com/ is a great resource when you have a particular feature in mind to use - but are but sure the of browser compatibility.

In addition, many HTML5/CSS3 features have additional links with further information available on Can I Use.

老街孤人 2024-12-25 13:41:00

Paul Irish 有一个很棒的评论 HTML5 样板

来自“为什么它很棒”:

跨浏览器兼容(IE6,是的,我们已经做到了。)HTML5 就绪。使用
确定的新标签。

Paul Irish has an awesome commented HTML5 Boilerplate.

From "Why it is awesome":

Cross-browser compatible (IE6, yeah we got that.) HTML5 ready. Use the
new tags with certainty.

安静 2024-12-25 13:41:00

用IE6打开这个网站,发现:http://html5test.com/

(我没有安装IE6,所以我无法为您检查 atm)

您可能还想看看: HTML5 跨浏览器 Polyfill

Open this website in IE6 and find out: http://html5test.com/

(I don't have IE6 installed so I can not check it for you atm)

You also might wanna have a look at: HTML5 Cross Browser Polyfills.

も让我眼熟你 2024-12-25 13:41:00

我想你必须避免很多事情:-)

我首先要避免:
- 拖放API,
- 文件API

I guess you have to avoid many things :-)

I would start by avoiding:
- Drag and Drop API,
- File API

塔塔猫 2024-12-25 13:41:00

Quirksmode 一直让我受益匪浅。
我认为你的问题应该更具体一些 - 我不担心 IE 兼容性,所以我会说全部使用它们。但是我知道视图并不是所有人共享的,所以我认为更好的答案是全部使用它们,直到遇到与目标浏览器/操作系统明确不兼容的视图

一旦您开始看到出现问题,然后努力纠正它们。

我会再说一遍 - 将受支持的浏览器/操作系统的特定列表放在一起,您的情况会好得多(提示 - 如果您想使用其中的大部分功能,则不支持

Quirksmode has always done me well.
I think you should be a little more specific in your question - I don't worry about IE compatibility so I would say use them All. However I know that view is not shared by all, So i think a better answer would be use them all until you run into one that explicitly is not compatible with your target browsers / os

Once you start to see problems then work on correcting them.

I will say it once again - put together a specific list of supported browsers / os and you will be much much better off (hint - don't support < IE9 if you want to use the majority of these features)

弥枳 2024-12-25 13:41:00

HTML5 doctype () 在 IE 6 中工作得很好(因为它将 IE 6 放入 标准模式)。

除此之外,我认为 IE 6 几乎不支持 HTML5 或 CSS3 中的任何新内容(除了 @font-face),因此您至少必须确定 IE 6 中的体验是否良好就足够好了。不过,有用的是,新功能在 IE 6 中通常不会产生任何负面影响。

例如,新的 类型,如 < /code> 将像 IE 6 中的 一样呈现。因此,您必须决定仅使用简单的文本输入是否适合 IE 6 用户,或者是否需要提供使用 JavaScript 的日期选择功能。

这几乎是所有 HTML5/CSS3 功能的问题 - 旧版浏览器的用户可以不用它们,还是需要添加替代实现?

主要的例外是 HTML5 中的新标签 - Internet Explorer 6 不允许您设置样式它不知道的标签,除非您使用 JavaScript 创建该标签的实例。 (HTML 4 标签 也是如此,因为 IE 由于某种原因也不知道这一点。)

The HTML5 doctype (<!doctype html>) works just fine in IE 6 (in as much as it puts IE 6 into standards mode).

Aside from that, I think pretty much nothing new in HTML5 or CSS3 (apart from @font-face) is supported in IE 6, so you’ll have to at least decide whether the experience in IE 6 is good enough. Usefully though, the new features generally don’t have any negative effect in IE 6.

For example, the new <input> types like <input type="date"> will render just like <input type="text"> in IE 6. So you’ll have to decide whether just having a simple text input is fine for IE 6 users, or whether you need to provide date-picking functionality using JavaScript.

This is pretty much the question with all HTML5/CSS3 features — can users of older browsers do without them, or do you need to add an alternative implementation?

The main exception is new tags in HTML5 — Internet Explorer 6 won’t let you style tags that it doesn’t know about, unless you create an instance of that tag using JavaScript. (The same is true of the HTML 4 tag <abbr>, because IE for some reason doesn’t know about that either.)

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