Visual Studio不显示SVG图像作为背景 [英] Visual Studio Not Displaying SVG image as background
问题描述
我有一个带有html文件(Html 5)的asp.net项目。我正在尝试使用CSS 3将SVG设置为我的身体标签的背景。我有这样的文件。
I have a asp.net project with a html file(Html 5). I am trying to set the SVG as background of my body tag using the CSS 3. I have my file like this.
在我的Style.css中。
In my Style.css.
当我双击并打开html文件。我可以看到机身充满了SVG,但是当我使用VS 2010进行调试时这不起作用。
when i double click and open the html file. i can see the body filled with SVG, but this is not working when i debug with VS 2010.
这是我使用vs 2010调试html时得到的结果。
This is what i got when i debug the html using the vs 2010.
我在这里错过了什么?如何解决这个问题?
Is any thing i missed here ? how to fix this ?
推荐答案
内置的Visual Studio Web服务器只有一组有限的mime类型可供服务。 SVG不是其中之一。
The built-in Visual Studio web server only has a limited set of mime-types it can serve. SVG is not one of them.
See here for a concise answer: https://serverfault.com/questions/359904/how-to-configure-iis-for-svg-and-web-testing-with-visual-studio
这篇关于Visual Studio不显示SVG图像作为背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!