客户端:HTML、DOM 和 CSS? [英] Client Side: HTML, DOM and CSS?

查看:29
本文介绍了客户端:HTML、DOM 和 CSS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有在应用程序的 Client Side/Front End 上进行广泛的工作,我正在尝试阅读有关 HTML、CSS 和 DOM 的信息,但不知何故无法弄清楚找出它们之间的区别,如果有人可以的话,我会非常感激:

I have not worked extensively on Client Side/Front End of the Application and I am trying to read about HTML, CSS and DOM but somehow am not able to figure out difference between them and so would really appreciate if someone can:

  1. 用简单的英语解释一下 HTML、CSS 和 DOM 是如何工作的?
  2. 从客户端技术的角度来看,它们如何相互关联?

更新我浏览了 wikipedia 文章,但无法清楚地理解 DOM 的工作原理.

Update I have gone through wikipedia articles but not able to clearly understand working of DOM.

谢谢.

推荐答案

HTML 是您网站上的内容(标题、列表、表格)

HTML is what is on your website (headings, lists, tables)

CSS 就是这些东西的样子(边框、颜色、字体大小)

CSS is what those things look like (borders, colours, font sizes)

DOM 是您通过 javascript 访问这些东西的方式(获取节点、添加新元素、更改它们的样式)

DOM is how you access those things through javascript (getting nodes, adding new elements, changing their style)

这是 3 个一起工作的示例(在 ie 中似乎不起作用)http://jsfiddle.net/gj9zT/

Here is an example of the 3 working together (doesn't seem to work in ie) http://jsfiddle.net/gj9zT/

这篇关于客户端:HTML、DOM 和 CSS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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