HTML DOM outline ÊôÐÔ
¶¨ÒåºÍÓ÷¨
outline ÊôÐÔÔÚÒ»¸öÉùÃ÷ÖÐÉèÖÃËùÓÐÂÖÀªÊôÐÔ¡£
Óï·¨£º
Object.style.outline = outlineWidth outlineStyle outlineColor
¿ÉÄܵÄÖµ
Öµ | ÃèÊö | Öµ |
---|---|---|
outlineWidth | ÉèÖÃÂÖÀªµÄ¿í¶È¡£ |
|
outlineStyle | ÉèÖÃÂÖÀªµÄÑùʽ¡£ |
|
outlineColor | ÉèÖÃÂÖÀªµÄÑÕÉ«¡£ |
|
ʵÀý
ÏÂÃæµÄÀý×Ӹıä¶ÎÂäÖÜΧµÄÂÖÀª£º
<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>
TIY
- outline - ¸Ä±äÔªËØÖÜΧµÄÂÖÀª£¨ÇëÔÚ·Ç IE ä¯ÀÀÆ÷ÖÐä¯ÀÀ£©