HTML5 - 源元素属性问题 [英] HTML5 - Source element attribute question
问题描述
源元素媒体属性的所有可能值是什么?
What are all the possible values for the source elements media attribute?
推荐答案
HTML5的标准说:
media属性将媒体资源的预期
媒体类型提供给
帮助用户代理确定此
媒体资源是否对用户$ b有用获取之前$ b。它的值必须是
a有效的媒体查询。
The media attribute gives the intended media type of the media resource, to help the user agent determine if this media resource is useful to the user before fetching it. Its value must be a valid media query.
如果你这样做,它将引导你到媒体查询页。
If you follow that, it will lead you to the Media Queries page.
规范性参考媒体类型是 CSS2.1 标准,其中州:
The normative reference for media types is the CSS2.1 standard, which states:
all
Suitable for all devices.
braille
Intended for braille tactile feedback devices.
embossed
Intended for paged braille printers.
handheld
Intended for handheld devices (typically small screen, limited bandwidth).
print
Intended for paged material and for documents viewed on screen in print preview mode. Please consult the section on paged media for information about formatting issues that are specific to paged media.
projection
Intended for projected presentations, for example projectors. Please consult the section on paged media for information about formatting issues that are specific to paged media.
screen
Intended primarily for color computer screens.
speech
Intended for speech synthesizers. Note: CSS2 had a similar media type called 'aural' for this purpose. See the appendix on aural style sheets for details.
tty
Intended for media using a fixed-pitch character grid (such as teletypes, terminals, or portable devices with limited display capabilities). Authors should not use pixel units with the "tty" media type.
tv
Intended for television-type devices (low resolution, color, limited-scrollability screens, sound available).
请注意,HTML4有不同的媒体类型列表:
Note that HTML4 has a different list of media types:
'print','screen','aural','braille','掌上','print','projection','screen','tty','tv '。
‘print’, ‘screen’, ‘aural’, ‘braille’, ‘handheld’, ‘print’, ‘projection’, ‘screen’, ‘tty’, ‘tv’.
这篇关于HTML5 - 源元素属性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!