javascriptoutlineproperty


  Translation results:

English[ˈaʊtlaɪn] US[ˈaʊtˌlaɪn]

n. Outline, outline, outline, draft, key points, main principles; shape, outline, contour line, outline drawing method, sketch (drawing method)

vt. Overview; outline; outline, sketch, sketch

Third person singular: outlines Plural: outlines Present participle: outlining Past tense: outlined Past participle: outlined

javascriptoutlinepropertysyntax

Function:Set all outline attributes.

Syntax: Object.style.outline = outlineWidth outlineStyle outlineColor

Parameters: outlineWidth Set the width of the outline. outlineStyle sets the style of the outline. outlineColor Set the color of the outline.

javascriptoutlinepropertyexample

<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>

Run instance »

Click the "Run instance" button to view the online instance

Home

Videos

Q&A