HTML DOM 스타일 unicodeBidi 속성은 방향 속성과 함께 동일한 HTML 문서에서 여러 언어를 지원하도록 텍스트를 재정의해야 하는지 여부를 반환하고 수정합니다.
구문
다음은 구문입니다 -
-
unicodeBidi 반환
object.style.unicodeBidi
-
unicodeBidi 수정
object.style.unicodeBidi = “value”
값
여기서 값은 -
일 수 있습니다.| 값 | 설명 |
|---|---|
| 상속 | 상위 요소에서 이 속성 값을 상속합니다. |
| 초기 | 이 속성 값을 기본값으로 설정합니다. |
| 정상 | 임베딩의 추가 수준을 설정하지 않습니다. |
| 삽입 | 임베딩의 추가 수준을 설정합니다. |
| 비디 오버라이드 | 임베딩의 추가 수준을 설정하고 방향 속성에 따라 재정렬합니다. |
예시
HTML DOM 스타일 unicodeBidi 속성의 예를 살펴보겠습니다 -
<!DOCTYPE html>
<html>
<head>
<style>
body {
color: #000;
background: lightblue;
height: 100vh;
text-align: center;
}
.btn {
background: #db133a;
border: none;
height: 2rem;
border-radius: 2px;
width: 40%;
display: block;
color: #fff;
outline: none;
cursor: pointer;
margin: 1rem auto;
}
</style>
</head>
<body>
<h1>DOM Style transformStyle Property Example</h1>
<p style="direction:ltr">This is a paragraph element with some dummy text.</p>
<button onclick="add()" class="btn">Set unicodeBidi</button>
<script>
function add() {
document.querySelector('p').style.direction = "rtl";
document.querySelector('p').style.unicodeBidi = "bidi-override";
}
</script>
</body>
</html> 출력
이것은 다음과 같은 출력을 생성합니다 -

"unicodeBidi 설정을 클릭합니다. ” 버튼을 눌러 단락 요소에 unicodeBidi CSS 속성을 설정합니다.
