<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div class="box1" style="position: absolute;">
<div class="box2" style="position: fixed;">
<div class="box3"></div>
</div>
</div> <script>
//offsetParent:复习盒子中带有定位的盒子
//复习盒子中都没有定位,返回body
//如果有,谁有返回最近哪个 var box3 = document.getElementsByClassName("box3")[0]; console.log(box3.offsetParent); </script> </body>
</html>

  

最新文章

  1. Oracle_多表查询
  2. October 20th Week 43rd Thursday, 2016
  3. Angular JS中 Promise用法
  4. PL/0编译器(java version) - Err.java
  5. XAF学习笔记之 Upcasting
  6. 在C#中IEnumerable与IEnumerator
  7. hdu 2795 线段树
  8. lastIndexOf方法——获取字符最后的索引
  9. 编写WCF服务时右击配置文件无“Edit WCF Configuration”(编辑 WCF 配置)远程的解决办法
  10. IBM WebSphere ESB入门指南
  11. Session的过期时间如何计算?
  12. 吴恩达机器学习笔记2-代价函数I(cost function)
  13. 从a文件判断是否删除b文件中的行(sed示例)
  14. console控制台的小问题
  15. Codeforces 359E Neatness
  16. Hudson与Jenkins
  17. Linux引导程序类型
  18. STM32 TIMER DIAGRAM
  19. Linux学习13-CentOS安装ab做压力测试
  20. (转)Mysql 多表查询详解

热门文章

  1. 用Excel生成Sql
  2. Cuda入门笔记
  3. DataGridView使用技巧(七、设定列宽和行高自动调整)----.NET
  4. ls参数
  5. vijos 1164 曹冲养猪
  6. UVA1515 Pool construction (最小割模型)
  7. python基础一 day13 生成器
  8. Jarvis OJ-Smashes
  9. asp.net core vs2017运行控制台应用程序一闪而过没执行
  10. CF-1100 E Andrew and Taxi