zoukankan      html  css  js  c++  java
  • html元素的 height、clientHeight和offsetHeight之间的区别

    height:指元素内容的高度  ,jQuery中的height()方法返回的就是这个高度。

    clientHeight:内容高度+padding高度  ,jQuery中的innerHeight()方法返回的就是这个高度。

    offsetHeight:内容高度+padding高度+边框宽度  ,jQuery中的outerHeight()方法返回的就是这个高度。

    width:指元素内容的宽度  ,jQuery中的width()方法返回的就是这个宽度。

    clientWidth:内容高度+padding宽度  ,jQuery中的innerWidtht()方法返回的就是这个宽度。

    offsetWidth:内容高度+padding高度+边框宽度  ,jQuery中的outerWidth()方法返回的就是这个宽

  • 相关阅读:
    The AndroidManifest.xml File
    handlebars简单用法
    高性能跨语言模板引擎Crox
    C++17 新特性
    C++ 14新特性
    [lua]笔记
    [lua]笔记
    delphi关键字
    delphi 基础
    TCP/UDP
  • 原文地址:https://www.cnblogs.com/chenjiajia/p/7043784.html
Copyright © 2011-2022 走看看