Latest web development tutorials

ASP.NET Style BorderWidth 屬性

Style 控件 Style控件

定義和用法

BorderWidth 屬性用於設置或返回控件的邊框寬度。

語法

<asp:webcontrolid="id" BorderWidth="length"runat="server" />

属性 描述
length 边框的宽度。必须是合法的 .NET 长度单位。合法的长度单位是:cm、mm、in、pt、pc 或 px。


實例

下面的實例設置了表格的邊框寬度:

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

演示實例»

嘗試一下- 演示

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


Style 控件 Style控件