HTML DOM outlineStyle Property
Complete Style Object Reference
Definition and Usage
The outlineStyle property sets the style of the outline around an element.
Syntax
Object.style.outlineStyle=style
|
Possible Values
Value |
Description |
none |
Defines no outlines |
dotted |
Defines a dotted outline |
dashed |
Defines a dashed outline |
solid |
Defines a solid outline |
double |
Defines two lines around the element. The width of the
two lines are the same as the outline-width value |
groove |
Defines a 3D grooved outline. The effect depends on the
outline-color value |
ridge |
Defines a 3D ridged outline. The effect depends on the
outline-color value |
inset |
Defines a 3D inset outline. The effect depends on the
outline-color value |
outset |
Defines a 3D outset outline. The effect depends on the
outline-color value |
Example
The following example changes the style of the outline:
<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.outlineStyle="dotted";
}
</script>
</head>
<body>
<input type="button" onclick="changeOutline()"
value="Change outline style" />
<p id="p1">This is a paragraph</p>
</body>
</html>
|
Try-It-Yourself Demos
outlineStyle - Change the style of the outline around an element
Complete Style Object Reference
|
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.
The XML Certificate is for developers who want to document their knowledge of XML, XML DOM and XSLT.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
The PHP Certificate is for developers who want to document their knowledge of PHP and SQL (MySQL).
|
|