CSS
-webkit-touch-callout
불량마늘
2016. 10. 22. 11:39
-webkit-touch-callout
MDN 링크 : https://developer.mozilla.org/ko/docs/Web/CSS/-webkit-touch-callout
/* Keyword values */
-webkit-touch-callout: default;
-webkit-touch-callout: none;
/* Global values */
-webkit-touch-callout: initial;
-webkit-touch-callout: inherit;
-webkit-touch-callout: unset;
-webkit-touch-callout 는 모바일기기에서 사용하는 css 이다.
PC웹에서는 필요가 없다.
이는 사용자가 화면을 길게 누르고 있으면 화면 하단에서 나오는 메뉴를 제어할 수 있다.
보통 아이폰 모바일 웹에서 어떠한 링크를 길게 누르고 있으면
이와 같은 메뉴가 나타나는데
-webkit-touch-callout : none; 으로 설정해 놓으면 이 메뉴가 뜨지 않도록 해주는 것이다.
MDN 사이트에서는 아이폰 사파리에서 사용한다고 적혀져 있다.
페이지 전반에 이를 제어하고 싶을때는
html {
-webkit-touch-callout : none;
}
을 적어 주고,
어떤 영역별로 제어하고 싶다면
.className {
-webkit-touch-callout : none;
}
이렇게 적용하도록 하자.