codecamp

ASP.NET Style BorderWidth 属性

ASP.NET BorderWidth 属性


Style 控件 Style 控件

定义和用法

BorderWidth 属性用于设置或返回控件的边框宽度。

语法

<asp:webcontrol id="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 控件
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }