윤곽선 색상을 설정하려면 outlineColor를 사용하세요. JavaScript의 속성. 다음 코드를 실행하여 outlineColor를 구현하는 방법을 배울 수 있습니다. 속성 -
예시
<!DOCTYPE html>
<html>
<head>
<style>
#box {
border: 2px solid red;
}
</style>
</head>
<body>
<div id = "box">
Demo Content
</div>
<br>
<button type = "button" onclick = "display()">Change outline color</button>
<script>
function display() {
document.getElementById("box").style.outlineColor = "#FF5733";
document.getElementById("box").style.outline = "2px solid";
}
</script>
</body>
</html>