Latest web development tutorials

ASP.NET Style BorderColor 屬性

Style 控件 Style控件

定義和用法

BorderColor 屬性用於設置或返回控件的邊框顏色。

語法

<asp:webcontrolid="id" BorderColor="color"runat="server" />

属性 描述
color 设置为控件的边框颜色的颜色。必须是合法的 HTML 颜色


實例

下面的實例設置了表格的邊框顏色:

<form runat="server">
<asp:Table runat="server" BorderColor="#FF0000"
BorderWidth="5" GridLines="vertical">
<asp:TableRow>
<asp:TableCell>Hello</asp:TableCell>
<asp:TableCell>World</asp:TableCell>
</asp:TableRow>
</asp:Table>
</form>

演示實例»

嘗試一下- 演示

設置Button控件的邊框顏色(帶有聲明和腳本)


Style 控件 Style控件