Skip to content

Commit

Permalink
Adding a better example of image-set (mdn#3970)
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelandrew authored Apr 9, 2021
1 parent 1a7a7dd commit a74d23a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions files/en-us/web/css/image-set()/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ <h2 id="Examples">Examples</h2>

<h3 id="Using_image-set_to_provide_alternative_background-image_options">Using image-set() to provide alternative background-image options</h3>

<pre class="brush: css">background-image: image-set( "cat.png" 1x,
"cat-2x.png" 2x,
"cat-print.png" 600dpi);</pre>
<p>{{EmbedGHLiveSample("css-examples/images/image-set.html", '100%', 600)}}</p>

<p>This example shows how to use <code><a class="css" href="https://drafts.csswg.org/css-images-4/#funcdef-image-set" id="ref-for-funcdef-image-set⑨">image-set()</a></code> to provide two alternative {{cssxref("background-image")}} options, chosen depending on the resolution needed: a normal version and a high-resolution version.</p>

Expand Down

0 comments on commit a74d23a

Please sign in to comment.