.Net 中是否有用于 CSS 媒体类型的系统枚举?

发布于 2024-09-30 14:41:34 字数 1339 浏览 1 评论 0原文

我想知道 .NET 内部是否有一个枚举,其中包含可以在 css 中使用的所有不同媒体类型?

像这样的东西:

/// <summary>
/// List of available media types for css (comments from http://www.w3schools.com/css/css_mediatypes.asp)
/// </summary>
public enum CssMediaType
{
    /// <summary>
    /// Used for all media type devices
    /// </summary>
    all,
    /// <summary>
    /// Used for speech and sound synthesizers
    /// </summary>
    aural,
    /// <summary>
    /// Used for braille tactile feedback devices
    /// </summary>
    braille,
    /// <summary>
    /// Used for paged braille printers
    /// </summary>
    embossed,
    /// <summary>
    /// Used for small or handheld devices
    /// </summary>
    handheld,
    /// <summary>
    /// Used for printers
    /// </summary>
    print,
    /// <summary>
    /// Used for projected presentations, like slides
    /// </summary>
    projection,
    /// <summary>
    /// Used for computer screens
    /// </summary>
    screen,
    /// <summary>
    /// Used for media using a fixed-pitch character grid, like teletypes and terminals
    /// </summary>
    tty,
    /// <summary>
    /// Used for television-type devices
    /// </summary>
    tv
}

I was wondering if there is an enum inside .NET that contains all the different media types that you can use in css?

Something like:

/// <summary>
/// List of available media types for css (comments from http://www.w3schools.com/css/css_mediatypes.asp)
/// </summary>
public enum CssMediaType
{
    /// <summary>
    /// Used for all media type devices
    /// </summary>
    all,
    /// <summary>
    /// Used for speech and sound synthesizers
    /// </summary>
    aural,
    /// <summary>
    /// Used for braille tactile feedback devices
    /// </summary>
    braille,
    /// <summary>
    /// Used for paged braille printers
    /// </summary>
    embossed,
    /// <summary>
    /// Used for small or handheld devices
    /// </summary>
    handheld,
    /// <summary>
    /// Used for printers
    /// </summary>
    print,
    /// <summary>
    /// Used for projected presentations, like slides
    /// </summary>
    projection,
    /// <summary>
    /// Used for computer screens
    /// </summary>
    screen,
    /// <summary>
    /// Used for media using a fixed-pitch character grid, like teletypes and terminals
    /// </summary>
    tty,
    /// <summary>
    /// Used for television-type devices
    /// </summary>
    tv
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

魄砕の薆 2024-10-07 14:41:34

我从来没有遇到过......但看起来你已经尝试过:-)

I've never come across one ... but it looks like you've given it a heck of a go already :-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文