微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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 obvIoUsly 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.jb51.cc/html5/168076.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。