0
我的下面的代碼不能按預期工作。不在矩形的背景中顯示圖像。爲什麼這段代碼沒有在svg rectangale上顯示背景圖片
<html>
<body>
<svg width="600" height="700">
<rect width="300" height="400" class="eq__NEcontainer__currentAlarmAction" style="fill:url(#godhelpme);">
<title stroke="blue">My test</title>
</rect>
<defs id="godhelpme">
<pattern width="200" height="200" x="0" y="0" patternUnits="userSpaceOnUse">
<image width="200" height="200" class="eq__NEcontainer__currentAlarmAction" xlink:href="CurrentList.png"></image>
</pattern>
</defs>
</svg>
</body>
</html>
該矩形總是黑色,如圖像。有任何想法嗎 ? 。我曾嘗試使用chrome進行調試。在調試器中點擊圖片標籤顯示爲空。我附上了圖片以供參考。 。任何幫助將不勝感激。
呃,你的CSS標籤似乎無關緊要無碼。 –
從圖像中刪除班級,看看什麼是hapening? –