আউটলাইন প্রস্থ সেট করতে, outlineWidth ব্যবহার করুন সম্পত্তি আপনি JavaScript-
এর সাথে একটি উপাদানের চারপাশে রূপরেখার প্রস্থ সেট করতে নিম্নলিখিত কোডটি চালানোর চেষ্টা করতে পারেনউদাহরণ
<!DOCTYPE html>
<html>
<head>
<style>
#box {
width: 450px;
background-color: orange;
border: 3px solid red;
margin-left: 20px;
}
</style>
</head>
<body>
<p>Click below to add Outline Width.</p>
<div id="box">
<p>This is a div. 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. This is a div.</p>
<p>This is a div. This is a div. This is a div. This is a div. This is a div.</p>
</div>
<br>
<button type="button" onclick="display()">Set Outline Width</button>
<br>
<script>
function display() {
document.getElementById("box").style.outlineColor = "#5F5F5F";
document.getElementById("box").style.outlineStyle = "solid";
document.getElementById("box").style.outlineWidth = "7px";
}
</script>
</body>
</html>