From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- files/ko/web/css/user-select/index.html | 123 ++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 files/ko/web/css/user-select/index.html (limited to 'files/ko/web/css/user-select/index.html') diff --git a/files/ko/web/css/user-select/index.html b/files/ko/web/css/user-select/index.html new file mode 100644 index 0000000000..fde0e2cc88 --- /dev/null +++ b/files/ko/web/css/user-select/index.html @@ -0,0 +1,123 @@ +--- +title: user-select +slug: Web/CSS/user-select +tags: + - CSS + - CSS Property + - Reference + - 'recipe:css-property' +translation_of: Web/CSS/user-select +--- +
{{CSSRef}}
+ +

CSS user-select 속성은 사용자가 텍스트를 선택할 수 있는지 지정합니다.

+ +
/* 키워드 값 */
+user-select: none;
+user-select: auto;
+user-select: text;
+user-select: contain;
+user-select: all;
+
+/* 전역 값 */
+user-select: inherit;
+user-select: initial;
+user-select: unset;
+
+ +

구문

+ +
+
none
+
이 요소와 아래 요소의 텍스트를 선택하지 못하도록 막습니다. 단 {{domxref("Selection")}} 객체는 none인 요소(와 그 아래)를 포함할 수 있습니다.
+
auto
+
+

auto의 사용값은 아래와 같이 결정됩니다.

+ +
    +
  • ::before::after 의사 요소의 사용값은 none입니다.
  • +
  • 편집 가능한 요소의 사용값은 contain입니다.
  • +
  • 그렇지 않고, 부모 요소 user-select의 사용값이 all이면 이 요소의 사용값도 all입니다.
  • +
  • 그렇지 않고, 부모 요소 user-select의 사용값이 none이면 이 요소의 사용값도 none입니다.
  • +
  • 그렇지 않으면 사용값은 text입니다.
  • +
+
+
text
+
사용자가 텍스트를 선택할 수 있습니다.
+
all
+
요소의 콘텐츠가 원자적으로 선택됩니다. 즉 선택 범위는 이 요소와 그 아래의 자손 전체를 포함해야 하며 일부만 담을 수는 없습니다. 하위 요소에서 더블 클릭이나 콘텍스트 클릭이 발생한 경우, all을 지정한 조상 요소 중 제일 상위 요소를 선택합니다.
+
contain
+
선택의 시작을 이 요소 안에서 한 경우, 범위가 요소 바깥으로 벗어날 수 없습니다.
+
+ +

형식 정의

+ +

{{CSSInfo}}

+ +

형식 구문

+ +
{{csssyntax}}
+ +

예제

+ +

HTML

+ +
<p>You should be able to select this text.</p>
+<p class="unselectable">Hey, you can't select this text!</p>
+<p class="all">Clicking once will select all of this text.</p>
+
+ +

CSS

+ +
.unselectable {
+  -moz-user-select: none;
+  -webkit-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+
+.all {
+  -moz-user-select: all;
+  -webkit-user-select: all;
+  -ms-user-select: all;
+  user-select: all;
+}
+
+ +

결과

+ +

{{EmbedLiveSample("예제")}}

+ +

명세

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('CSS4 UI', '#propdef-user-select', 'user-select')}}{{Spec2('CSS4 UI')}}Initial definition. Also defines -webkit-user-select as a deprecated alias of user-select.
+ +

브라우저 호환성

+ +
+ + +

{{Compat("css.properties.user-select")}}

+
+ +

같이 보기

+ + -- cgit v1.2.3-54-g00ecf