HTML DOM outline Property
Complete Style Object Reference
Definition and Usage
The outline property sets all outline properties in one declaration.
Syntax
Object.style.outline=outlineWidth outlineStyle outlineColor
|
Possible Values
Value |
Description |
Values |
outlineWidth |
Sets the width of the outline |
thin
medium
thick
length |
outlineStyle |
Sets the style of the outline |
none
hidden
dotted
dashed
solid
double
groove
ridge
inset
outset |
outlineColor |
Sets the color of the outline |
color-name
color-rgb
color-hex
transparent |
Example
The following example changes the outline around a paragraph:
<html>
<head>
<style type="text/css">
p
{
border: thin solid #00FF00;
outline: thick solid #FF0000;
}
</style>
<script type="text/javascript">
function changeOutline()
{
document.getElementById("p1").style.outline="thin dotted #0000FF";
}
</script>
</head>
<body>
<input type="button" onclick="changeOutline()"
value="Change outline" />
<p id="p1">This is a paragraph</p>
</body>
</html>
|
Try-It-Yourself Demos
outline - Change the outline around an element
Complete Style Object Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|