gpt4 book ai didi

html - 为什么背景大小为 :100% 100%; not work on this SVG?

转载 作者:太空宇宙 更新时间:2023-11-03 21:11:03 25 4
gpt4 key购买 nike

看例子:

.container {
background-image:url("http://svgshare.com/i/3cM.svg");
background-position:center center;
background-repeat:no-repeat;
width:400px;
height:200px;
background-color:#eef;
border-bottom:1px solid #000;
background-size:100% 100%;
}
<div id="container1" class="container"></div>

相关问题:Stretch a background image (SVG) to 100% width and 100% height?

最佳答案

打开你的 .svg 文件并设置

preserveAspectRatio="none"

在 SVG 标签内。

关于html - 为什么背景大小为 :100% 100%; not work on this SVG?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46979192/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com