하나의 선언에서 모든 개요 속성을 설정하려면 개요를 사용하십시오. 재산. 다음 속성을 설정합니다:outline-width, outline-style 및 outline-color.
예시
다음 코드를 실행하여 아웃라인 속성으로 작업하는 방법을 배울 수 있습니다. −
<!DOCTYPE html>
<html>
<head>
<style>
#box {
border: 2px dashed blue;
}
</style>
</head>
<body>
<div id="box">This is a div.</div>
<br>
<button type="button" onclick="display()">Click to set Outline</button>
<script>
function display() {
document.getElementById("box").style.outline = "5px solid red";
}
</script>
</body>
</html>