The Modern Web by Peter Gasston

The Modern Web by Peter Gasston

Author:Peter Gasston
Language: eng
Format: epub, azw3
Tags: COMPUTERS / Web / Site Design
ISBN: 9781593274887
Publisher: No Starch Press
Published: 2013-04-21T16:00:00+00:00


.bar { background-image: url('foo.svg#icon1'); }

The :target pseudo-class is applied when the hash of a URL matches the id of an element; in this case the URL hash is #icon1, so the :target selector applies to the svg element #icon1. As all other svg elements are set to not be displayed, #icon1 is shown regardless of its order in the stock. You can see an example of this in svg-icon.html and illustrated in Figure 7-3.

Figure 7-3. The same source image is used for both buttons, but each has a unique icon because of the stacking technique.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.