반응형

inset은 태그 요소의 위치를 결정하는 top, right, bottom, left의 축약 스타일 속성입니다. 

 

inset(top right bottom left)

 

 

 

상하좌우를 각각의 css 속성으로 설정하지 않고 inset 하나만 사용하는 것이 가능합니다.

 

예시1

.box {
    position: absolute;
    inset: 10px 10px 0 0;
    background: #3399ff;
}
 

 

예시2

.box {
    position: absolute;
    inset:auto 0 0 auto;
    background: #3399ff;
}
 

 

 

 

지원 브라우저

https://caniuse.com/?search=inset

https://caniuse.com/?search=inset

반응형

'css' 카테고리의 다른 글

user-select  (0) 2023.11.14
[ios] touch-callout  (0) 2023.11.14
html/css 드래그방지 user-drag  (1) 2023.11.14
css user-select 텍스트 선택하기  (0) 2023.10.18
css color Level4 Display-P3  (0) 2023.10.17

+ Recent posts