html5 - 请问怎么放置svg图片,我想让他嵌入成为网页背景,是放在css中吗?
怪我咯
怪我咯 2017-04-17 12:08:48
0
4
893

请问怎么放置svg图片,我想让他成为网页背景,是放在css中吗?
<svg xmlns="http://www.w3.org/2000/svg&quot; width="1920" height="1080"><path d="M393,-177L564,-178L696,-190Z" fill="#cceac3" stroke="#cceac3" stroke-width="1.51"/><path d="M28,-188L393,-177L696,-190Z" fill="#dff3c1" stroke="#dff3c1" stroke-width="1.51"/><path d="M28,-188L696,-190L773,-193Z" fill="#d2edc3" stroke="#d2edc3" stroke-width="1.51"/><path d="M453,1271L271,1290L867,1267Z" fill="#61788f" stroke="#61788f" stroke-width="1.51"/><path d="M867,1267L271,1290L1130,1291Z" fill="#476f90" stroke="#476f90" stroke-width="1.51"/><path d="M28,-188L773,-193L1291,-204Z" fill="#bee4c6" stroke="#bee4c6" stroke-width="1.51"/><path d="M1291,-204L1497,-203L1627,-207Z" fill="#9fb2c2" stroke="#9fb2c2" stroke-width="1.51"/><path d="M1521,1272L1130,1291L1640,1293Z" fill="#1c4989" stroke="#1c4989" stroke-width="1.51"/><path d="M28,-188L1291,-204L1956,-218Z" fill="#a8d1ca" stroke="#a8d1ca" stroke-width="1.51"/><path d="M1291,-204L1627,-207L1956,-218Z" fill="#9da5bd" stroke="#9da5bd" stroke-width="1.51"/><path d="M1627,-207L1826,-205L1956,-218Z" fill="#9c97b8" stroke="#9c97b8" stroke-width="1.51"/><path d="M2016,528L2078,564L2088,417Z" fill="#3a6b96" stroke="#3a6b96" stroke-width="1.51"/><path d="M2088,417L2078,564L2095,630Z" fill="#326894" stroke="#326894" stroke-width="1.51"/><path d="M2095,630L2015,663L2107,801Z" fill="#245c94" stroke="#245c94" stroke-width="1.51"/><path d="M2015,663L1986,772L2107,801Z" fill="#225897" stroke="#225897" stroke-width="1.51"/><path d="M2106,-92L1949,-40L2123,67Z" fill="#888691" stroke="#888691" stroke-width="1.51"/><path d="M1949,-40L1980,83L2123,67Z" fill="#848695" stroke="#848695" stroke-width="1.51"/><path d="M2105,-156L2106,-92L2123,67Z" fill="#86848c" stroke="#86848c" stroke-width="1.51"/><path d="M2107,801L2006,910L2127,924Z" fill="#1c468a" stroke="#1c468a" stroke-width="1.51"/><path d="M2006,910L1995,1005L2127,924Z" fill="#1d408a" stroke="#1d408a" stroke-width="1.51"/><path d="M2095,630L2107,801L2127,924Z" fill="#1d518d" stroke="#1d518d" stroke-width="1.51"/><path d="M2088,417L2095,630L2128,172Z" fill="#476f90" stroke="#476f90" stroke-width="1.51"/><path d="M2090,302L2088,417L2128,172Z" fill="#5a758e" stroke="#5a758e" stroke-width="1.51"/><path d="M2123,67L2007,163L2128,172Z" fill="#767f8e" stroke="#767f8e" stroke-width="1.51"/><path d="M2007,163L2090,302L2128,172Z" fill="#6b7b90" stroke="#6b7b90" stroke-width="1.51"/><path d="M2095,630L2127,924L2128,172Z" fill="#2d6491" stroke="#2d6491" stroke-width="1.51"/><path d="M2007,1295L2123,1294L2129,1133Z" fill="#12246b" stroke="#12246b" stroke-width="1.51"/><path d="M1986,1121L2007,1295L2129,1133Z" fill="#182978" stroke="#182978" stroke-width="1.51"/><path d="M2128,172L2127,924L2133,1057Z" fill="#1f578e" stroke="#1f578e"

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(4)
Ty80

Just use it like other formats of pictures. If it is supported, it will be displayed. If it is not supported, it will not be displayed.

洪涛

background: url(xxx.svg);
I don’t know if I can directly write the svg content to the background. 0.0

巴扎黑

Put it in p postion:absoulted or fixed; z-index:-1

PHPzhong

http://www.gbtags.com/technology/html/20130325-html5-css3-using-svg/

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!