CSS Master

(Primo) #1
background-size: 300px auto;
}
li {
background-size: 20px auto;
background-repeat: no-repeat;
background-position: left 3px;
padding-left: 25px;
}

Figure 8.12. Manipulating the SVG viewport with the CSS background-size property

Conclusion


UsingSVGwithCSSgivesusmorepossibilitiesforflexibleandadaptivedocuments.
Uponcompletingthischapter,youshouldnowknowhowto:


■ useCSStostyleSVGelements


■ animateSVGproperties


■ employCSSmediaqueriesandthematchMediaAPItoshowandhideportions
ofanSVGdocument


■ utilizethe:targetpseudo-classwithSVGtocreateaspritingsystem


Using CSS with SVG 327

Free download pdf