HTML5 DOCTYPE是否会影响CSS3效果的呈现方式? [英] Does HTML5 DOCTYPE affect how CSS3 effects are rendered?

查看:79
本文介绍了HTML5 DOCTYPE是否会影响CSS3效果的呈现方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果cct3效果(例如动画)被渲染,如果doctype定义为



<!DOCTYPE html> (html5)



或者让我们说常见

 <!DOCTYPE html PUBLIC -  // W3C // DTD XHTML 1.0 Transitional // ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> 

不同的doctypes如何影响css渲染(除了运行怪异模式,知道以不同的方式渲染)?



范例感谢。

解决方案



doctype的选择只影响,以及使用怪癖模式,标准模式(没有怪异模式),几乎标准模式(有限怪怪模式)中的浏览器模式 p>

请参阅: http:// hsivonen.iki.fi/doctype/



因此, XHTML 1.0 Transitional 提供了几乎标准模式,而<!DOCTYPE html> 则为标准模式。



可轻松修复有关表的调整 s < a>。另一种是嵌套在某些HTML5元素中的标题元素的处理。


Is there any difference how the css3 effects (for example animation) are rendered if the doctype is defined as

<!DOCTYPE html> (html5)

or as let's say common

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

How do different doctypes affect css rendering (except running quirks mode that is know to render differently)?

Samples appreciated.

解决方案

There is almost no difference* between those two doctypes in terms of CSS rendering.

The choice of doctype only affects validation, and which "browser mode" is used out of "Quirks Mode", "Standards Mode" ("no quirks mode"), "Almost Standards Mode" ("limited quirks mode").

See: http://hsivonen.iki.fi/doctype/

So, XHTML 1.0 Transitional gives "Almost Standards Mode", whereas <!DOCTYPE html> gives "Standards Mode".

*One difference is a minor and easily fixable adjustment concerning tables. Another is the treatment of heading elements nested inside certain HTML5 elements.

这篇关于HTML5 DOCTYPE是否会影响CSS3效果的呈现方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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