Mozilla.com

  1. MDC
  2. 首页
  3. DOM
  4. element.clientHeight

« Gecko DOM 参考

摘要

返回元素内部的高度(单位像数), 包含 padding 但不包括水平滚动条,border 和 margin.

clientHeight 可以通过 CSS height + CSS padding - 水平滚动条高度 (如果存在)来计算.

语法和值

var h = element.clientHeight;

返回整数 h 表示 element 的 clientHeight(单位像素).

clientHeight 是只读的.

范例

padding-top

Gentle, individualistic and very loyal, Birman cats fall between Siamese and Persian in character. If you admire cats that are non aggressive, that enjoy being with humans and tend to be on the quiet side, you may well find that Birman cats are just the felines for you.

Image:BirmanCat.jpgAll Birmans have colorpointed features, dark coloration of the face, ears, legs and tail.

Cat image and text coming from http://www.best-cat-art.com/

padding-bottom

LeftTopRightBottommargin-topmargin-bottomborder-topborder-bottom

Image:clientHeight.png

规范

不是属于W3C规格。

注意

clientHeight 是一个非标准属性, 它从 Internet Explorer 对象模型引入. 它是 HTML 的特有属性.

Page last modified 18:04, 9 Dec 2006 by Mgjbot

文件 (0)