MDN :

The Document.documentElement read-only property returns the Element that is the root element of the document (for example, the <html> element for HTML documents) .

层级关系:

1. document

2. documentElement(html)

3. head, body

document.documentElement 和 document.body的更多相关文章

  1. 【转】document.documentElement和document.body的区别

    转自:http://www.cnblogs.com/ckmouse/archive/2012/01/30/2332070.html 网页中获取滚动条卷去部分的高度,可以通过 document.body ...

  2. document.documentElement和document.body的区别

    网页中获取滚动条卷去部分的高度,可以通过 document.body.scrollTop 来获取,比如使div跟着滚动条滚动: <div id="div" style=&qu ...

  3. js中document.documentElement 和document.body 以及其属性 clientWidth等

    在设计页面时可能经常会用到固定层的位置,这就需要获取一些html对象的坐标以更灵活的设置目标层的坐标,这里可能就会用到document .body.scrollTop等属性,但是此属性在xhtml标准 ...

  4. 不同浏览器对document.documentElement和document.body的scrollheight ,scrollTop,clientHeight以及判断滚动条是否滚动到页面最底部 【转载】

    前段时间学习怎么写一个瀑布流的时候,就接触到document.documentElement和document.body的区别,然后今天查资料的时候看到这篇博客,遂转载记录在此. 两种特殊的文档属性可 ...

  5. document.documentElement 和document.body 以及其属性

    js中document.documentElement 和document.body 以及其属性 (原来HTML里是document.body  --XHTML里是document.documentE ...

  6. 点击图片或者鼠标放上hover .图片变大. 1)可以使用css中的transition, transform 2) 预先设置一个 弹出div. 3)弹出层 alert ; 4) 浏览器的宽度document.documentElement.clientWidth || document.body.clientWidth

    变大: 方法一: 利用css属性. 鼠标放上 hover放大几倍. .kecheng_02_cell_content img { /*width: 100px; height: 133px;*/ wi ...

  7. document.documentElement和document.body区别介绍

    document.documentElement和document.body区别介绍 * 区别 body是DOM对象黎明的body子节点,即标签 docummentElement 是整个树的根节点ro ...

  8. document.documentElement和document.body 与document.compatMode的关系

    首先我们看看document.compatMode(兼容模式): document.compatMode它有两种可能的返回值:BackCompat和CSS1Compat, document.compa ...

  9. IE/FF/Chrome下document.documentElement和document.body的 scrollHeight/scrollTop/clientHeight 以及判断滚动条是否已拉到页面最底部

    DTD已声明 IE document.documentElement.scrollHeight 浏览器所有内容高度 ,document.body.scrollHeight 浏览器所有内容高度 docu ...

  10. IE/FF/Chrome下document.documentElement和document.body的 scrollHeight/scrollTop/clientHeight

    IEdocument.documentElement.scrollHeight  浏览器所有内容高度 ,document.body.scrollHeight  浏览器所有内容高度document.do ...

随机推荐

  1. mysql下优化表和修复表命令(repair table、optimize table)

    随着mysql的长期使用,肯定会出现一些问题,一般情况下mysql表无法访问,就可以修复表了,优化时减少磁盘占用空间,方便备份. repair table table_name //修复表 optim ...

  2. NoSQL数据库技术实战-第1章 NoSQL与大数据简介 NoSQL产生的原因

    NoSQL产生的原因: 关系型数据库不擅长的操作,是NoSQL应运而生的原因: 大量的数据写入操作书上写的是“大量数据的写入操作“,我理解的应该是“大量的数据写入操作”,因为大量的数据写入操作才会引起 ...

  3. 使用curl出现,curl: /usr/local/lib/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)

    主要原因是curl找不到openssl的路径,所以只要将openssl的路径添加到相应的变量中就可以了. 参考连接https://blog.csdn.net/RookieWutongshu/artic ...

  4. 卸载nginx

    sudo apt-get remove nginx nginx-common # 卸载删除除了配置文件以外的所有文件. sudo apt-get purge nginx nginx-common # ...

  5. 使用nodejs进行开发,concurrently模块,使我们同时执行多个命令。

    concurrently模块使用. 安装模块 npm install concurrently 配置concurrently 运行多个服务 当我们使用nodejs和vue混合开发的时候.当要同时启动后 ...

  6. 关于lower_bound()和upper_bound()

    关于lower_bound()和upper_bound(): 参考:关于lower_bound( )和upper_bound( )的常见用法 注意:查找的数组必须要是排好序的.因为,它们查找的方式也是 ...

  7. Binary Protocol

    A. Binary Protocol 这道题要唯一注意的一点就是数字0的表示--0个"1"来表达,所以字符串"100"所表示的数字就是100 附代码: // C ...

  8. Lucas(卢卡斯)定理

    Lucas定理 对于C(m,n)%P(P是质数)这样的问题,可以通过预处理阶乘和阶乘的逆元,来快速计算.但是当m,n大于P时,就不能保证m,n与P互质了,但不互质的情况下,乘法逆元不存在,此时就需要卢 ...

  9. spring cloud stream整合

    spring cloud stream整体架构核心概念图: 图一:消息的发送端和接收端可以是不同的中间件 图二: 图三:在消息的发送之前和消息的接收端套了一层管道 @Output:输出注释,用于定义发 ...

  10. 「CSA Round #41」BFS-DFS

    题目链接 戳我 \(Description\) 给出一个图的\(bfs\)序和\(dfs\)序,构造出一个满足条件的图,边的扫描顺序为读入顺序 \(Solution\) 这个题还是很简单的. 先来看看 ...