Home >Web Front-end >HTML Tutorial >【CSS】width 、clientWidth、scrollWidth、offsetWidth_html/css_WEB-ITnose

【CSS】width 、clientWidth、scrollWidth、offsetWidth_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:22:291214browse

先说  宽度clientWidth、scrollWidth、offsetWidth参见[http://www.w3school.com.cn/jsref/dom_obj_all.asp](http://)![输入图片说明](https://static.oschina.net/uploads/img/201603/28214520_0UhN.png "在这里输入图片标题")clientWidth:可见宽度,包括元素的内容区,就是最里面那部分,包括padding,不包括magin,不包括border,不包括滑动条scrollWidth:可以滚动的clientWidthoffsetWidth:不包括magin,其他都包括

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn