mozilla

Revision 28387 of <uri>

  • Revision slug: CSS/uri
  • Revision title: uri
  • Revision id: 28387
  • Created:
  • Creator: Jürgen Jeka
  • Is current revision? No
  • Comment wrong links etc; 84 words added, 53 words removed

Revision Content

{{ CSSRef() }}

Summary

Many CSS properties take a URI as value, such as {{ Cssxref("background-image") }}, {{ Cssxref("cursor") }}, {{ Cssxref("@font-face") }}, {{ cssxref("list-style") }} etc.  The format of a URI value is url( , followed by the URI itself, followed by ).  The URI may be quoted.  Relative URIs are allowed.

Syntax

 <a_css_property>:  url("http://mysite.example.com/mycursor.png"

 <a_css_property>:  url(http://mysite.example.com/mycursor.png)

Examples

.topbanner { background: url("topbanner.png") #00D repeat fixed; }

Browser compatibility

Browser Lowest version
Internet Explorer 3.0
Firefox 1.0 (1.0)
Opera 3.5
Safari (WebKit) 1.0 (85)

Specifications

Revision Source

<p>{{ CSSRef() }}</p>
<h3>Summary</h3>
<p>Many <a href="/en/CSS_Reference" title="en/CSS_Reference">CSS properties</a> take a URI as value, such as {{ Cssxref("background-image") }}, {{ Cssxref("cursor") }}, {{ Cssxref("@font-face") }}, {{ cssxref("list-style") }} etc.  The format of a URI value is<code> url( </code>, followed by the URI itself, followed by<code> )</code>.  The URI may be quoted.  Relative URIs are allowed.</p>
<h3>Syntax</h3>
<pre> &lt;a_css_property&gt;:  url("http://mysite.example.com/mycursor.png"

 &lt;a_css_property&gt;:  url(http://mysite.example.com/mycursor.png)
</pre>
<h3>Examples</h3>
<pre>.topbanner { background: url("topbanner.png") #00D repeat fixed; }
</pre>
<h3>Browser compatibility</h3>
<table class="standard-table"> <tbody>  <tr> <th>Browser</th> <th>Lowest version</th> </tr> <tr> <td>Internet Explorer</td> <td>3.0</td> </tr> <tr> <td>Firefox</td> <td>1.0 (1.0)</td> </tr> <tr> <td>Opera</td> <td>3.5</td> </tr> <tr> <td>Safari (WebKit)</td> <td>1.0 (85)</td> </tr> </tbody>
</table>
<h3>Specifications</h3>
<ul> <li><a class="external" href="http://www.w3.org/TR/CSS21/syndata.html#uri" title="http://www.w3.org/TR/CSS21/syndata.html#uri">CSS 2.1 Syntax #uri</a></li> <li><a class="external" href="http://www.w3.org/TR/css3-values/#uris" title="http://www.w3.org/TR/css3-values/#uris">CSS 3 Values and units #uri</a> Working draft</li>
</ul>
Revert to this revision