イムは、異なるサイズで同じアイコンを使用することが可能ですか?同じアイコンがgulp svgスプライトと異なるサイズですか? <a href="https://github.com/jkphl/gulp-svg-sprite" rel="nofollow">https://github.com/jkphl/gulp-svg-sprite</a></p> <p>一気-SVG-スプライトを使用して
http://codepen.io/anon/pen/qZQvYN
.icon-small,
.icon-large {
background-image: url(https://lincolnloop.com/static/assets/img/lincolnloop-mark.9b93136b4561.svg);
background-size: 100% 100%;
}
.icon-small {
width: 50px;
height: 50px;
}
.icon-large {
width: 100px;
height: 100px;
}
しかし、今、私は私がバックグラウンドとして、このソリューションを使用するカントスプライトを使用していていること:これは簡単だったし、実際に私がSVGsについて最も好きなものの一つであったspriting前サイズはmixinから来ます。私がこれを上書きしたとしても、バックグラウンドポジションは間違っています。
http://codepen.io/anon/pen/JXezaK
.icon-small,
.icon-large {
background-image: url(https://scotthsmith.com/projects/social-icons/blue/IconGrid.svg?v1.11);
background-size: auto 400px;
border: 1px solid grey;
}
.icon-small {
width: 50px;
height: 50px;
}
.icon-large {
width: 100px;
height: 100px;
}
あなたのサンプルのSVGスプライトの代わりに、PNG形式の例を投稿することができますか? – Thoran
@Thoran Iveさんが私の質問を更新しました。 – Evans
は規模を変えることができますか? http://codepen.io/hkh222/pen/xVQBMOまたはもっと適切な解決策が必要ですか? – Thoran