CSSFont {Microsoft.VisualBasic.MIME.Html.CSS} .NET clr documentation

CSSFont

Description

 font-style: style; font-size: size; font-family: Name;

这个简写属性用于一次设置元素字体的两个或更多方面。使用 icon 等关键字可以适当地设置元素的字体,使之与用户计算机环境中的某个方面一致。 注意,如果没有使用这些关键词,至少要指定字体大小和字体系列。 可以按顺序设置如下属性:

可以不设置其中的某个值,比如 font:100% verdana; 也是允许的。未设置的属性会使用其默认值。

Declare

            
# namespace Microsoft.VisualBasic.MIME.Html.CSS
export class CSSFont extends ICSSValue {
   color: string;
   # Css string for set font style
   CSSValue: string;
   # A string representation of the FontFamily for the new System.Drawing.Font.
   family: string;
   # 该属性设置元素的字体大小。注意,实际上它设置的是字体中字符框的高度;实际的字符字形可能比这些框高或矮(通常会矮)。 各关键字对应的字体必须比一个最小关键字相应字体要高,并且要小于下一个最大关键字对应的字体。
   # 
   # 
   # 
    #
  • xx-small: 把字体的尺寸设置为不同的尺寸,从 xx-small 到 xx-large。
  • #
  • x-small
  • #
  • small
  • #
  • medium: 默认值:medium。
  • #
  • large
  • #
  • x-large
  • #
  • xx-large
  • #
  • smaller: 把 font-size 设置为比父元素更小的尺寸。
  • #
  • larger: 把 font-size 设置为比父元素更大的尺寸。
  • #
  • length: 把 font-size 设置为一个固定的值。
  • #
  • %: 把 font-size 设置为基于父元素的一个百分比值。
  • #
  • inherit: 规定应该从父元素继承字体尺寸。
  • #
size: string; # The FontStyle of the new font. style: FontStyle; # font-variant属性设置小型大写字母的字体显示文本,这意味着所有的小写字母均会被转换为大写, 但是所有使用小型大写字体的字母与其余文本相比,其字体尺寸更小。 # # #
    #
  • normal: 默认值。浏览器会显示一个标准的字体。
  • #
  • small-caps: 浏览器会显示小型大写字母的字体。
  • #
  • inherit: 规定应该从父元素继承 font-variant 属性的值。
  • #
variant: string; # 该属性用于设置显示元素的文本中所用的字体加粗。数字值 400 相当于 关键字 normal,700 等价于 bold。 每个数字值对应的字体加粗必须至少与下一个最小数字一样细,而且至少与下一个最大数字一样粗。 # # #
    #
  • normal: 默认值。定义标准的字符。
  • #
  • bold: 定义粗体字符。
  • #
  • bolder: 定义更粗的字符。
  • #
  • lighter: 定义更细的字符。
  • #
  • 100: 定义由粗到细的字符。400 等同于 normal,而 700 等同于 bold。
  • #
  • 200: 同上
  • #
  • 300: 同上
  • #
  • 400: 同上
  • #
  • 500: 同上
  • #
  • 600: 同上
  • #
  • 700: 同上
  • #
  • 800: 同上
  • #
  • 900: 同上
  • #
  • inherit: 规定应该从父元素继承字体的粗细。
  • #
weight: double; }

.NET clr type reference tree

  1. this class extends from ICSSValue class: ICSSValue
  2. use by property member style: FontStyle

[Package {$package} version {$version} Index]