ASP.NET BorderColor 屬性


Style 控件 Style 控件

定義和用法

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

語法

<asp:webcontrol id="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 控件