2011-04-16 92 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