inset 属性用作定位元素的 top、right、bottom、left 这些属性的简写。相似于 margin 和 padding 属性,按照“上右下左”的程序。举个例子:

inset: 0; /* 等同于 `top: 0; right: 0; bottom: 0; left: 0;` */inset: 1px 2px; /* 等同于 `top: 1px; right: 2px; bottom: 1px; left: 2px;` */inset: 1px 2px 3px; /* 等同于 `top: 1px; right: 2px; bottom: 3px; left: 2px;` */inset: 1px 2px 3px 4px; /* 等同于 `top: 1px; right: 2px; bottom: 3px; left: 4px;` */

留神:inset 属性只作用于定位元素。Internet Explorer 浏览器上不反对该属性!!!