[TIL] 2021/07/21

yongkini ·2021년 7월 22일
0

Today I Learned

목록 보기
108/172

1) 모든 부분에 대해서 드래그를 못하도록 막는 body css 특성
-webkit-user-select: none !important;
-moz-user-select: -moz-none !important;
-ms-user-select: none !important;
user-select: none !important;

2) 이미지 복사를 막는 특성
pointer-events: none !important;

3) 아이폰에서 (웹뷰로 만들었을 때) 이미지 드래그 하면 이미지 복사 기능 등을 막아놓을 때
body { -webkit-touch-callout:none;}

4) 추가로, 안드로이드에서 3번과 같은 기능을 할 때는, script에 넣어준다

<script type="text/javascript">
// 안드로이드 우측 버튼 비활성
$(document).bind("contextmenu", function (e) {
return false;
});
</script>

*3,4번 레퍼런스 : 참고 사이트

profile
완벽함 보다는 최선의 결과를 위해 끊임없이 노력하는 개발자

0개의 댓글