aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/stylesheet/media/index.html
blob: c82286e57c45c7ffb9e04b6eb17cd9927905c184 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
title: StyleSheet.media
slug: Web/API/StyleSheet/media
translation_of: Web/API/StyleSheet/media
---
<div>{{APIRef("CSSOM")}}</div>

<h2 id="Summary" name="Summary">概述</h2>

<p><strong>media</strong> specifies the intended destination medium for style information.</p>

<h2 id="Syntax" name="Syntax">语法</h2>

<pre class="eval"><em>medium</em> = stylesheet.media
stylesheet.media =<em>medium</em>
</pre>

<h2 id="Parameters" name="Parameters">参数</h2>

<ul>
 <li><code>medium</code> is a string describing a single medium or a comma-separated list.</li>
</ul>

<h2 id="Example" name="Example">示例</h2>

<pre>&lt;link rel="StyleSheet" href="document.css" type="text/css" media="screen" /&gt;
</pre>

<h2 id="Notes" name="Notes">注意</h2>

<p>The default value for media is "screen."</p>

<h2 id="Specification" name="Specification">Specification</h2>

<p>DOM Level 2 Styles - STYLESHEET</p>