aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/css/backface-visibility/index.html
blob: 49c365e5f9e82d137ea08855312001b632f869e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
---
title: backface-visibility
slug: Web/CSS/backface-visibility
tags:
  - CSS
  - CSS Property
  - CSS Transforms
  - Reference
  - 'recipe:css-property'
translation_of: Web/CSS/backface-visibility
---
<div>{{CSSRef}}</div>

<p><a href="/ko/docs/Web/CSS">CSS</a> <strong><code>backface-visibility</code></strong> 속성은 요소의 뒷면이 사용자를 향할 때 보여야 하는지 지정합니다.</p>

<div>{{EmbedInteractiveExample("pages/css/backface-visibility.html")}}</div>



<p>요소의 뒷면은 앞면의 거울상입니다. 2D 상태에서는 볼 수 없지만 변형을 통해 3D 공간에서 회전되면 노출될 수 있습니다. (2D 변형에는 원근이 없으므로 효과가 없습니다.)</p>

<h2 id="구문">구문</h2>

<pre class="brush:css no-line-numbers notranslate">/* 키워드 값 */
backface-visibility: visible;
backface-visibility: hidden;

/* 전역 값 */
backface-visibility: inherit;
backface-visibility: initial;
backface-visibility: unset;</pre>

<p><code>backface-visibility</code> 속성은 다음 목록의 키워드 중 하나를 선택해 지정할 수 있습니다.</p>

<h3 id="값"></h3>

<dl>
 <dt><code>visible</code></dt>
 <dd>뒷면이 사용자를 향하면 보입니다.</dd>
 <dt><code>hidden</code></dt>
 <dd>뒷면이 사용자를 향해도 보이지 않습니다. 요소가 뒤를 향하면 사용자로부터 숨기는 것과 같습니다.</dd>
</dl>

<h2 id="형식_정의">형식 정의</h2>

<p>{{cssinfo}}</p>

<h2 id="형식_구문">형식 구문</h2>

<pre class="syntaxbox notranslate">{{csssyntax}}</pre>

<h2 id="예제">예제</h2>

<h3 id="육면체의_뒷면_비교">육면체의 뒷면 비교</h3>

<p>아래 예제는 투명한 뒷면의 육면체와 불투명한 뒷면의 육면체를 하나씩 보입니다.</p>

<h4 id="HTML">HTML</h4>

<pre class="brush: html notranslate">&lt;table&gt;
  &lt;tr&gt;
    &lt;th&gt;&lt;code&gt;backface-visibility: visible;&lt;/code&gt;&lt;/th&gt;
    &lt;th&gt;&lt;code&gt;backface-visibility: hidden;&lt;/code&gt;&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      &lt;div class="container"&gt;
        &lt;div class="cube showbf"&gt;
          &lt;div class="face front"&gt;1&lt;/div&gt;
          &lt;div class="face back"&gt;2&lt;/div&gt;
          &lt;div class="face right"&gt;3&lt;/div&gt;
          &lt;div class="face left"&gt;4&lt;/div&gt;
          &lt;div class="face top"&gt;5&lt;/div&gt;
          &lt;div class="face bottom"&gt;6&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;p&gt;
        Since all faces are partially transparent,
        the back faces (2, 4, 5) are visible
        through the front faces (1, 3, 6).
      &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
      &lt;div class="container"&gt;
        &lt;div class="cube hidebf"&gt;
          &lt;div class="face front"&gt;1&lt;/div&gt;
          &lt;div class="face back"&gt;2&lt;/div&gt;
          &lt;div class="face right"&gt;3&lt;/div&gt;
          &lt;div class="face left"&gt;4&lt;/div&gt;
          &lt;div class="face top"&gt;5&lt;/div&gt;
          &lt;div class="face bottom"&gt;6&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;p&gt;
        The three back faces (2, 4, 5) are
        hidden.
      &lt;/p&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;</pre>

<h4 id="CSS">CSS</h4>

<pre class="brush: css notranslate">/* Classes that will show or hide the
   three back faces of the "cube" */
.showbf div {
  backface-visibility: visible;
}

.hidebf div {
  backface-visibility: hidden;
}

/* Define the container div, the cube div, and a generic face */
.container {
  width: 150px;
  height: 150px;
  margin: 75px 0 0 75px;
  border: none;
}

.cube {
  width: 100%;
  height: 100%;
  perspective: 550px;
  perspective-origin: 150% 150%;
  transform-style: preserve-3d;
}

.face {
  display: block;
  position: absolute;
  width: 100px;
  height: 100px;
  border: none;
  line-height: 100px;
  font-family: sans-serif;
  font-size: 60px;
  color: white;
  text-align: center;
}

/* Define each face based on direction */
.front {
  background: rgba(0, 0, 0, 0.3);
  transform: translateZ(50px);
}

.back {
  background: rgba(0, 255, 0, 1);
  color: black;
  transform: rotateY(180deg) translateZ(50px);
}

.right {
  background: rgba(196, 0, 0, 0.7);
  transform: rotateY(90deg) translateZ(50px);
}

.left {
  background: rgba(0, 0, 196, 0.7);
  transform: rotateY(-90deg) translateZ(50px);
}

.top {
  background: rgba(196, 196, 0, 0.7);
  transform: rotateX(90deg) translateZ(50px);
}

.bottom {
  background: rgba(196, 0, 196, 0.7);
  transform: rotateX(-90deg) translateZ(50px);
}

/* Make the table a little nicer */
th, p, td {
  background-color: #EEEEEE;
  margin: 0px;
  padding: 6px;
  font-family: sans-serif;
  text-align: left;
}</pre>

<h4 id="결과">결과</h4>

<p>{{EmbedLiveSample('육면체의_뒷면_비교', '100%', 360)}}</p>

<h2 id="명세">명세</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSS Transforms 2', '#propdef-backface-visibility', 'backface-visibility')}}</td>
   <td>{{Spec2('CSS Transforms 2')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="브라우저_호환성">브라우저 호환성</h2>



<p>{{Compat("css.properties.backface-visibility")}}</p>

<h2 id="같이_보기">같이 보기</h2>

<ul>
 <li><a href="/ko/docs/Web/CSS/CSS_Transforms/Using_CSS_transforms">CSS 변형 사용하기</a></li>
</ul>