border-left

設定物件左框線的屬性。

語法

{ border-left: sBorder }

可能的值

sBorder

指定或接收下列一或多個空格分隔值的字串:

color

border-left-color 屬性可用的任何色彩值範圍。

style

border-left-style 屬性可用的任何樣式值範圍。

width

border-left-width 屬性可用的任何寬度值範圍。

此屬性的預設值為 medium none 。這不是繼承屬性。

備註

border-left 屬性是複合屬性,可設定物件左框線的寬度、樣式和色彩值。

border-left 複合屬性未設定的所有個別框線屬性都會設成其預設值。例如,寬度的預設值為 medium

如果未指定色彩,則會使用文字色彩。

範例

下列範例使用 border-left 屬性來指定複合屬性。此範例會呼叫內嵌 (全域) 樣式表,以在發生 onmouseover 事件時,變更右框線的屬性:

<head>
<style>
    td { border-left: 4px red groove; }
    .change { border-left: 2px yellow solid; }
</style>

</head>
<body>
<table> 
<tr> 
    <td onmouseover="this.className='change'" 
        onmouseout="this.className=''">
        <img src="sphere.jpg"></td> 
</tr>
</table>

標準資訊

您可以在 Cascading Style Sheets (CSS), Level 1 (CSS1) (階層式樣式表 (CSS) 層級 1 (CSS1)) Ee371291.xtlink_newWindow(zh-tw,Expression.40).png 找到此屬性的定義。

適用範圍

a, abbr, acronym, b, bdo, big, blockquote, body, button, caption, center, cite, code, custom, dd, defaults, del, dfn, div, dl, dt, em, embed, fieldset, font, form, frameset, frame, hn, i, iframe, img, input type=button, input type=checkbox, input type=file, input type=image, input type=password, input type=radio, input type=reset, input type=submit, input type=text, ins, li, object, ol, p, q, s, span, sub, table, td, th, tt, u, ul, var, xmp

另請參閱

概念

border
border-left-width
border-left-style
border-left-color
色彩