dom里面三种跟位置相关的元素

页面位置和大小,元素的位置和大小,鼠标位置

①window;位置(position):(screenLeft, screenTop) 【(screenX, screenY不兼容IE)】

大小(size) :(innerWidth,innerHeight),(outerWidht,outherHeight)

②element;位置(position):(offsetLeft,offsetTop)

大小(size):(clientWidth,clientHeight),(offsetWidth,offsetHeight)

③鼠标;位置坐标(position):a)鼠标相对于视口:(clientX,clientY)

b)页面(pageX,pageY)

c)事件源(offsetX,offsetY)

d)屏幕(screenX,screenY)

dom 页面位置和大小,元素的位置和大小,鼠标位置的更多相关文章

  1. zedgraph控件怎么取得鼠标位置的坐标值(转帖)

    我想取得zedgraph控件上任意鼠标位置的坐标值,IsShowCursorValues可以显示鼠标位置的值但是不能提取赋值给其他的变量.用PointValueEvent这个事件又只能得到已经画出的点 ...

  2. 如何在CSS中映射的鼠标位置,并实现通过鼠标移动控制页面元素效果

    映射鼠标位置或实现拖拽效果,我们可以在 JavaScript 中做到这一点.但实际上,在CSS中有更加简洁的方法,我们可以在不使用JavaScript 的情况下,仍然可以实现相同的功能! 只使用CSS ...

  3. jquery获取元素在文档中的位置信息以及滚动条位置(转)

    jquery获取元素在文档中的位置信息以及滚动条位置 http://blog.csdn.net/qq_34095777/article/details/78750886     原文链接 原创 201 ...

  4. JS魔法堂:关于元素位置和鼠标位置的属性

    一.关于鼠标位置的属性   1. 触发鼠标事件的区域 盒子模型中的border,padding,content区域会触发鼠标事件,点击margin区域将不触发鼠标事件.   2. 鼠标事件对象Mous ...

  5. JQuery操作元素的属性与样式及位置 复制代码

    <script type="text/javascript" src="JQuery/jquery-1.5.1.js"></script> ...

  6. JQuery操作元素的属性与样式及位置

    <script type="text/javascript" src="JQuery/jquery-1.5.1.js"></script> ...

  7. 关于元素设置margin-top能够改变body位置的原因及解决(子元素设置margin-top改变父元素定位)

    关于元素设置margin-top能够改变body位置的原因及解决(子元素设置margin-top改变父元素定位) 起因:在进行bootstrap的.navbar-brand内文字设置垂直居中时采用li ...

  8. 获取元素在浏览器中的绝对位置(从jquery1.8中抠出来)

    <style> html,body{margin:0;padding:0;} .d1{margin-left:40px;background:red;width:2000px;height ...

  9. python删除指定位置 2个元素

    # -*- coding: utf-8 -*-__author__ = 'Administrator'import bisect#排序说明:http://en.wikipedia.org/wiki/i ...

随机推荐

  1. linux桌面系统开启windows远程访问

    本文基于centos系统,且默认你的桌面系统已经安装完成 1.在linux中安装如下软件 sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epe ...

  2. IntelliJ IDEA Check out from git

    点击check out from vesion control 填写git地址,test,clone

  3. PHP系列 | Session 存储在Redis

    默认是文件存储 修改php.ini的设置 session.save_handler = redis session.save_path = “tcp://127.0.0.1:6379″ 如果Redis ...

  4. Grid数字或金额千分位或保留两位小数

    formatter: 'number', formatoptions: { thousandsSeparator: "", decimalPlaces: 2 }

  5. vue---数据列表过滤筛选

    使用vue进行数据过滤筛选是比较常用的功能,常见的使用场景就是搜索框数据筛选过滤了.简单示例: <template> <div> <input type="te ...

  6. visual studio 无添加视图 选项

    我是因为 UserController未继承 Controller

  7. Swift编程语言中如何实现自定义类型的for-in循环(基于Swift 2.2)

    我们在Swift编程语言中常常会用到for-in循环(在编程语言术语中又被称为for-each).此外,从Swift 2.2版本起,for循环将只支持for-in形式,而不支持for i = 0; i ...

  8. 运行okvis-mono

    ./build/okvis_app_synchronous config/config_fpga_p2_euroc1.yaml ../mav0

  9. SpringBoot 使用AOP记录接口访问日志

    文章来源:https://macrozheng.github.io/mall-learning/#/technology/aop_log AOP AOP为Aspect Oriented Program ...

  10. [LeetCode] 712. Minimum ASCII Delete Sum for Two Strings 两个字符串的最小ASCII删除和

    Given two strings s1, s2, find the lowest ASCII sum of deleted characters to make two strings equal. ...