我可以使用一些矢量绘图来替换 html 中的 png 吗?
我有一个非常优化的网站,我想进一步优化。具体来说,我有一个相当大的徽标,目前是 png 格式。标志的形状非常简单。
我以前从未见过这样做,但是有没有一种方法可以在我的 html 中使用一些矢量绘图代码来绘制此徽标?我意识到 HTML5 可能可行,但 HTML4 和当前浏览器支持又如何呢?
谢谢,
简·伊斯特比
I have a very well optimized web site and I would like to optimize even more. Specifically I have a fairly large logo that's currently a png. The logo is a very simple shape.
I've never seen this done before but is there a way that I could code in the drawing of this logo using some vector drawing code within my html? I realize it's probably possible with HTML5 but what about HTML4 and current browser support.
Thanks,
Jane Easterby
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的网站中使用 SVG 仅与某些非 IE 浏览器兼容。
不过,SVG 可以根据访问者的情况由脚本动态替换。
是的,它可以在 HTML 4 中完成(通过某些浏览器,通常是那些已经支持 HTML 5 的浏览器。)
一些指南:
http://www.w3schools.com/svg/svg_inhtml.asp
http://codinginparadise.org/projects/svgweb/docs/QuickStart.html
http://msdn.microsoft.com/en-us/library/gg589526(v=vs.85).aspx
Using SVG within your website will only have compatibility with some non-IE browsers.
SVG though could be replaced dynamically by your script based on the visitor though.
And yes, it can be done in HTML 4 (by some browsers, generally those that already support HTML 5 anyway.)
Some guides:
http://www.w3schools.com/svg/svg_inhtml.asp
http://codinginparadise.org/projects/svgweb/docs/QuickStart.html
http://msdn.microsoft.com/en-us/library/gg589526(v=vs.85).aspx