[英]Why is there transparent area around my svg?
I made an svg image for on my site.我在我的网站上制作了一张 svg 图像。 When I use it though it looks like this:
当我使用它时,它看起来像这样:
There is alot of transparent area around it where I would say it could expand.它周围有很多透明区域,我会说它可以扩展。
There doesn't seem to be any transparent area in the svg image itself. svg 图像本身似乎没有任何透明区域。
When I use a png it works fine, just with the svg it creates this blank area.当我使用 png 时它工作正常,只需使用 svg 它就会创建这个空白区域。
I just gave the image a red background to see where the image actually is.我只是给图像一个红色背景,以查看图像的实际位置。
This is my css:这是我的 css:
#logo {
position: absolute;
left: 0;
top: 0;
background-color: red;
width: 200px;
height: 50px;
}
#logo directs to the <img>
in my html: #logo 指向我的 html 中的
<img>
:
<img src="Sources/FruityJuice Logo.svg" alt="FruityJuiceLogo" id="logo">
In Adobe Illustrator I cropped the file to the logo like Yong Pin said and that seems to have fixed it.在 Adobe Illustrator 中,我将文件裁剪为 Yong Pin 所说的徽标,这似乎已经修复了它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.