本博客用来记录用过的 HTML & CSS
HTML
placeholder // input 框的默认值
request & form & sumbit // input 必须填写
disabled // button 属性
input 事件
CSS
pointer-events:none // 事件穿透
box-shadow: 10px 10px 5px #888888;
rgba(R, G, B, A)
vw/vh
| 名称 | 单位 | 描述 |
|---|---|---|
| Viewport Width | vw | 视窗(Viewport)宽度的1/100 |
| Viewport Height | vh | 视窗(Viewport)高度的1/100 |
| Minimum Viewport | vmin | 视窗(Viewport)较小的那个尺寸的1/100(高度或宽度) |
| Maximum Viewport | vmax | 视窗(Viewport)较大的那个尺寸的1/100(高度或宽度) |
5.
| 元素外尺寸 | 元素边框尺寸 | 元素滚动尺寸 |
|---|---|---|
| offsetWidth | clientWidth | scrollWidth |
| offsetHeight | clientHeight | scrollHeight |
| offsetLeft | clientLeft | scrollLeft |
| offsetTop | clientTop | scrollTop |
clientHeight和clientWidth用于描述元素内尺寸,是指 元素内容+内边距 大小,不包括边框(IE下实际包括)、外边距、滚动条部分
offsetHeight和offsetWidth用于描述元素外尺寸,是指 元素内容+内边距+边框,不包括外边距和滚动条部分
clientTop和clientLeft返回内边距的边缘和边框的外边缘之间的水平和垂直距离,也就是左,上边框宽度
offsetTop和offsetLeft表示该元素的左上角(边框外边缘)与已定位的父容器(offsetParent对象)左上角的距离
offsetParent对象是指元素最近的定位(relative,absolute)祖先元素,递归上溯,如果没有祖先元素是定位的话,会返回null
background(button): linear-gradient(to bottom, #6a9bff, #0088cc);
- cursor: not-allowed // 鼠标样式
user-select: none;
-webkit-user-select: none; // 禁止选中文字