크기 조정 사용 사용자가 요소의 크기를 조정할 수 있는지 여부를 설정하는 속성입니다.
예시
다음 코드를 실행하여 JavaScript를 사용하여 사용자가 요소의 크기를 조정할 수 있는지 여부를 설정할 수 있습니다. -
<!DOCTYPE html>
<html>
<head>
<style>
#box {
width: 350px;
overflow: auto;
background-color: orange;
border: 3px solid red;
}
</style>
</head>
<body>
<p>Click to set the right position.</p>
<button type = "button" onclick = "display()"> Set Right Position </button>
<div id = "box">
<p>This is a div. This is a div. This is a div. This is a div.<p>
<p>This is a div. This is a div. This is a div. This is a div.<p>
<p>This is a div. This is a div. This is a div. This is a div.<p>
</div>
<br>
<br>
<script>
function display() {
document.getElementById("box").style.resize = "both";
}
</script>
</body>
</html>