【问题标题】:SVG Linear Gradient Size isn't changing in FirefoxSVG 线性渐变大小在 Firefox 中没有改变
【发布时间】:2012-10-03 21:01:02
【问题描述】:

我在使用 SVG 创建的线性渐变时遇到了问题。在 Firefox 中,我无法将其扩展到 250 像素左右。 这是我到目前为止所得到的。

    <svg>
       <defs>
          <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">
             <stop offset="0%" style="stop-color:rgb(0, 124, 57);stop-opacity:1" />
         <stop offset="100%" style="stop-color:rgb(0, 100, 47);stop-opacity:1" />
          </linearGradient>
   </defs>
   <rect width="" height="34" fill="url(#grad1)" />
</svg>

【问题讨论】:

  • 你能解释一下你需要什么尺寸吗?
  • 你最外层的&lt;svg&gt;元素有多大?

标签: firefox svg gradient linear-gradients


【解决方案1】:

&lt;svg&gt; 元素更改为&lt;svg height="100%" width="100%"&gt;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-10-03
    • 1970-01-01
    • 2012-11-11
    • 1970-01-01
    • 2011-04-29
    • 2012-03-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多