?
Dieses Dokument verwendet PHP-Handbuch für chinesische Websites Freigeben
BorderStyle 屬性用于設(shè)置或返回控件的邊框樣式。
<asp:webcontrol?id="id"?BorderStyle="style"?runat="server"?/>
值 | 描述 |
---|---|
NotSet | 未設(shè)置邊框樣式。 |
None | 定義無(wú)邊框。 |
Dotted | 定義點(diǎn)狀邊框。 |
Dashed | 定義虛線邊框。 |
Solid | 定義實(shí)線邊框。 |
Double | 定義雙實(shí)線邊框。兩條邊框的寬度與 border-width 的值相同。 |
Groove | 定義 3D 凹槽邊框。其效果取決于 border-color 的值。 |
Ridge | 定義 3D 壟狀邊框。其效果取決于 border-color 的值。 |
Inset | 定義 3D 內(nèi)嵌邊框。其效果取決于 border-color 的值。 |
Outset | 定義 3D 外嵌邊框。其效果取決于 border-color 的值。 |
下面的實(shí)例設(shè)置了表格的邊框樣式:
?<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>
設(shè)置 Button 控件的邊框樣式(帶有聲明和腳本)
<!DOCTYPE?html> <html> <head> <script??runat="server"> Sub?ChangeBorderStyle(obj?As?Object,?e?As?EventArgs) ??????button1.BorderStyle?=?CType([Enum].Parse(GetType(BorderStyle),"Solid"),?BorderStyle) End?Sub </script> </head> <body> <form?runat="server"> <asp:Button?id="button1"?runat="server"?BorderStyle="Dotted"?BorderWidth="10px"?Text="Change"?BorderColor="#FF0000"?OnClick="ChangeBorderStyle"?/> </form> </body> </html>