ASP.NET Style propiedades de fuente
Definición y Uso
propiedad de fuente se utiliza para establecer o devolver la fuente de control.
gramática
<asp:webcontrolid="id" font-subproperty="value"runat="server" />
Fuentes subatributo
值 | 描述 |
---|---|
Bold | 粗体子属性。可能的值是:TRUE 或 FALSE。 |
Italic | 斜体子属性。可能的值是:TRUE 或 FALSE。 |
Name | 字体名称属性(比如:"Verdana" 或 "Arial")。当您设置了该属性,则通过带有 Name 属性的值的单个元素数组来自动更新 Names 属性。 |
Names | 字体名称的数组。当您设置了该属性,则使用该数组中的第一个元素来自动更新 Name 属性。 |
Strikeout | 删除线子属性。可能的值是:TRUE 或 FALSE。 |
Underline | 下划线子属性。可能的值是:TRUE 或 FALSE。 |
Size | 字体尺寸子属性。规定字体尺寸。 |
Ejemplos
En el siguiente ejemplo, se establece la fuente del control Button:
<form runat="server">
<asp:Button id="Button1" Text="Submit"
Font-Name="Verdana" Font-Size="15" runat="server"/>
</form>
<asp:Button id="Button1" Text="Submit"
Font-Name="Verdana" Font-Size="15" runat="server"/>
</form>
La demostración >>
Trate - Demo
la fuente de control de botón (con la declaración y el guión)
control de estilo