什么是非替换的内联元素? [英] what is a non-replaced inline element?

查看:477
本文介绍了什么是非替换的内联元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在阅读 CSS2的高度属性时遇到了以下情况规范

Encountered the following while reading the height property of CSS2 specification:


适用于:未替换的内联元素,表格列和列组

Applies to: all elements but non-replaced inline elements, table columns, and column groups

我知道替换元素(< img> )或inline元素$ c>< button> ,< a> ),但无法找出未替换的内联元素的示例。

I understand what replaced element(<img>) or inline element(<button>, <a>) are, but having trouble finding out examples of non-replaced inline elements.

推荐答案

表达式未替换的内联元素没有自己的定义:它只是指任何元素非替换元素和内联元素。例如< a> 。 HTML中的大多数元素是未替换的。

The expression "non-replaced inline element" has no definition of its own: it simply refers to any element that is both a non−replaced element and an inline element. Such as <a>. Most elements in HTML are non-replaced. A non-replaced element is simply an element that is not a replaced element.

然而,在CSS规范中,只有一般的特性,概念被替换的元素,而不是被替换的元素任何此类元素的明确列表。这是可以理解的,因为HTML是独立于CSS而演进的。

However, in CSS specifications, there are just general characterizations the concept "replaced element", not any definitive list of such elements. This is understandable, since HTML evolves rather independently of CSS.

这个概念随着时间的推移有些变化。 CSS 1规范说:在HTML中,IMG, INPUT,TEXTAREA,SELECT和OBJECT元素可以是替换元素的示例。在较新的规范中,不再包括表单字段。这反映在HTML5草稿中,其中呈现部分在未替换的元素下显式地列出表单控件。根据它,唯一被替换的元素是那些嵌入外部内容,如图像,视频,小程序或HTML5画布到HTML文档 - 除了改进的菜单

The concept has somewhat changed over time. The CSS 1 spec said: "In HTML, IMG, INPUT, TEXTAREA, SELECT, and OBJECT elements can be examples of replaced elements." In newer specs, form fields are not included any more. This is reflected in the HTML5 draft, where the Rendering section explicitly lists form controls under Non-replaced elements. The only replaced elements, according to it, are those that embed external content, such as an image, video, applet, or HTML5 canvas into an HTML document – except that the revamped menu element is mentioned too (it is expected to be implement in a manner that echoes browser controls, so it sort-of embeds external content too).

这个变化反映了浏览器控件的浏览器发展。早期的浏览器使用系统例程以一种对CSS中任何东西免疫的方式实现形式字段,并且仍然存在这样的方法的一些遗留物,但是现在,形式字段可以大多使用CSS格式化,因此它们已经从替换到有效地改变,替换元素。

This change reflects browser development. Early browsers implemented form fields using system routines in a manner that was immune to anything in CSS, and there are still some remains of such approaches, but nowadays form fields can mostly be formatted with CSS, so they have effectively changed from replaced to non-replaced elements.

对于大多数实际用途,最好将replaced看作embedding。所以非替换的元素只是一个呈现的元素,而不是导致一些外部内容出现在它的位置。

For most practical purposes, it is best to read "replaced" as "embedding". So "non-replaced element" is just an element that is rendered as such, instead of causing some external content to appear in its place.

这篇关于什么是非替换的内联元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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