ASP.NET BorderStyle 屬性

定義和用法
BorderStyle 屬性用於設置或返回控件的邊框樣式。
語法
<asp:webcontrol id="id" BorderStyle="style" runat="server" />
可能的樣式值
值 | 描述 |
---|---|
NotSet | 未設置邊框樣式。 |
None | 定義無邊框。 |
Dotted | 定義點狀邊框。 |
Dashed | 定義虛線邊框。 |
Solid | 定義實線邊框。 |
Double | 定義雙實線邊框。兩條邊框的寬度與 border-width 的值相同。 |
Groove | 定義 3D 凹槽邊框。其效果取決於 border-color 的值。 |
Ridge | 定義 3D 壟狀邊框。其效果取決於 border-color 的值。 |
Inset | 定義 3D 內嵌邊框。其效果取決於 border-color 的值。 |
Outset | 定義 3D 外嵌邊框。其效果取決於 border-color 的值。 |
實例
下麵的實例設置了表格的邊框樣式:
<form runat="server">
<asp:Table runat="server" BorderStyle="dotted"
BorderWidth="5" GridLines="vertical">
<asp:TableRow>
<asp:TableCell>Hello</asp:TableCell>
<asp:TableCell>World</asp:TableCell>
</asp:TableRow>
</asp:Table>
</form>
<asp:Table runat="server" BorderStyle="dotted"
BorderWidth="5" GridLines="vertical">
<asp:TableRow>
<asp:TableCell>Hello</asp:TableCell>
<asp:TableCell>World</asp:TableCell>
</asp:TableRow>
</asp:Table>
</form>
嘗試一下 - 演示
