什么是DOM元素? [英] What is DOM element?

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

问题描述

以下语句中DOM元素的含义是什么?

Statement#1


您可以在
单个DOM元素中添加多个类。

You can add multiple classes to a single DOM element.

声明# 2


要点是
中的继承CSS不是通过类完成的,但是
通过元素层次结构。所以要
模型继承的特征,你需要
将它们应用到DOM中不同级别的
元素。

The -- point is that inheritance in CSS is done not through classes, but through element hierarchies. So to model inherited traits you need to apply them to different levels of elements in the DOM.

我知道DOM代表域对象模型。它似乎是API在语句中的同义词。

I know that DOM stands for Domain Object Model. It seems to be synonym to API in the statements.

推荐答案

文档对象模型。
DOM是Javascript看到包含页面数据的方式。这是一个包含HTML / XHTML / XML格式化以及浏览器状态的对象。

Document object model.
The DOM is the way Javascript sees its containing pages' data. It is an object that includes how the HTML/XHTML/XML is formatted, as well as the browser state.

DOM元素类似于页面上的DIV,HTML,BODY元素。您可以使用CSS为所有这些添加类,或者使用JS与他们进行交互。

A DOM element is something like a DIV, HTML, BODY element on a page. You can add classes to all of these using CSS, or interact with them using JS.

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

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