2011-04-16 68 views

回答

1

The standard for HTML5说:

媒体属性给出预期 媒体类型的媒体资源,以帮助 用户代理确定此 媒体资源是取它之前对用户有用的 。其值必须是 有效的媒体查询。

如果您按照此步骤操作,将会导致您进入Media Queries页面。

规范性引用的媒体类型是CSS2.1标准,其中规定:

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有媒体类型的不同列表:

'打印', '屏幕', '听觉','盲文','掌上','打印','投影','屏幕','tty','电视'。

+0

但是媒体查询页面中允许的值是什么? – emaol 2011-04-16 16:46:02

+0

我通过简单的链接更新了我的帖子。 – Mat 2011-04-16 17:04:59

+0

谢谢,这正是我正在寻找的。 – emaol 2011-04-16 17:06:59

0

allmedia query。提供了一个详尽的清单将是不切实际的(device-width: 1pxdevice-width: 2pxdevice-width: 3px等)

+0

但媒体查询页面中允许的值是什么? – emaol 2011-04-16 16:47:34

+0

点击链接查看规格。我不打算提供详尽的清单,因为这将是无限长的,我不打算将规格复制出来,因为这是毫无意义的。 – Quentin 2011-04-16 16:49:31

+0

我真的无法理解规格:( – emaol 2011-04-16 16:51:54

0

根据HTML5规范,你可以输入任何有效的“媒体查询”进入@media属性。这包括所有的常规值,如screenprint等上,但是你可以按照下面的链接描述做更多先进的东西:

http://dev.w3.org/csswg/css3-mediaqueries/#media0

例子:

<source media="screen and (device-aspect-ratio: 16/9)" src='video1_widescreen.ogv' type='video/ogg; codecs="theora, vorbis"'> 
<source media="screen" src='video1.ogv' type='video/ogg; codecs="theora, vorbis"'> 
<source media="not screen" src='video1_poster.jpg'> 
0

HTML 5 spec的草稿:

媒体属性给出媒体资源的预期媒体类型,以帮助用户年龄nt确定此媒体资源在提取之前是否对用户有用。其值必须是有效的媒体查询。

和:

字符串是一个有效的媒体查询,如果它的media_query_list生产的媒体查询规范相匹配。

媒体查询(MQ)规范是here

+0

的重要部分,但“媒体查询”页面中允许的值是什么? – emaol 2011-04-16 16:46:57