HTML5:未替换与替换元素?

前端之家收集整理的这篇文章主要介绍了HTML5:未替换与替换元素?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我看到了 section 10.3 Non-replaced elements in the HTML5 spec.我能够通过谷歌找到这个定义,但W3C HTML5的定义是哪个?

解决方法

CSS2.1 spec

Replaced Element

An element whose content is outside the scope of the CSS formatting model,such as an image,embedded document,or applet. For
example,the content of the HTML IMG element is often replaced by the
image that its “src” attribute designates. Replaced elements often
have intrinsic dimensions: an intrinsic width,an intrinsic height,
and an intrinsic ratio. For example,a bitmap image has an intrinsic
width and an intrinsic height specified in absolute units (from which
the intrinsic ratio can obv@R_301_437@sly be determined). On the other hand,
other documents may not have any intrinsic dimensions (for example,a
blank HTML document).

User agents may consider a replaced element to not have any intrinsic dimensions if it is believed that those dimensions could
leak sensitive information to a third party. For example,if an HTML
document changed intrinsic size depending on the user’s bank balance,
then the UA might want to act as if that resource had no intrinsic
dimensions.

The content of replaced elements is not considered in the CSS rendering model.

原文链接:https://www.f2er.com/html5/168076.html

猜你在找的HTML5相关文章