mozilla

Revision 28386 of <uri>

  • Revision slug: CSS/uri
  • Revision title: uri
  • Revision id: 28386
  • Created:
  • Creator: BijuGC
  • Is current revision? No
  • Comment new page

Revision Content

{{ CSSRef() }}

Summary

Many CSS properties take a URL as value, such as {{ Cssxref("background") }}, {{ Cssxref("cursor") }}, {{ Cssxref("@font-face") }} etc.

Syntax

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


Examples

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

Notes

Specifications

Browser compatibility

See also

Revision Source

<p> {{ CSSRef() }}
</p>
<h3 name="Summary"> Summary </h3>
<p>Many <a href="en/CSS_Reference">CSS properties</a> take a URL as value, such as {{ Cssxref("background") }}, {{ Cssxref("cursor") }}, {{ Cssxref("@font-face") }} etc. </p>
<h3 name="Syntax"> Syntax </h3>
<pre class="eval"> <i>&lt;a_css_property&gt;</i> : <span class="nowiki">url("http://mysite.example.com/mycursor.png")</span> ;
</pre>
<pre class="eval"> <i>&lt;a_css_property&gt;</i> : <span class="nowiki">url(http://mysite.example.com/mycursor.png)</span> ;
</pre>
<pre class="eval"> <i>&lt;a_css_property&gt;</i> : <span class="nowiki">"http://mysite.example.com/mycursor.png"</span> ;
</pre>
<pre class="eval"> <i>&lt;a_css_property&gt;</i> : <span class="nowiki">http://mysite.example.com/mycursor.png</span> ;
</pre>
<p><br>
</p>
<h3 name="Examples"> Examples </h3>
<pre class="eval">.topbanner {
   background: url("topbanner.png") #00D repeat fixed;
}
</pre>
<h3 name="Notes"> Notes </h3>
<h3 name="Specifications"> Specifications </h3>
<ul><li> <a class="external" href="http://www.w3.org/TR/REC-CSS1#percentage-units">CSS 1</a>
</li><li> <a class="external" href="http://www.w3.org/TR/CSS21/syndata.html#percentage-units">CSS 2.1</a>
</li><li> <a class="external" href="http://www.w3.org/TR/css3-values/#percentages">css3-values</a>
</li></ul>
<h3 name="Browser_compatibility"> Browser compatibility </h3>
<h3 name="See_also"> See also </h3>
Revert to this revision