0

私はこのスレッドをここで見ましたSVG アニメーションが Safari 13.1 (Mac OS & IOS)で苦労しています これは、機能していない「理由」に対処しているようですが、コードを変更してこの提案を追加する方法がわかりません:

<object type="image/svg+xml" data="animation/some.svg">

これが私のコードです..

// Build HTML
    return html`
      <style>
      ${this.style()}
      </style>
      <ha-card class = "card">
        <span class="icon bigger" id="icon-bigger" style="background: none, url(${this._hass.hassUrl("/local/icons/weather_icons/" + (this.config.static_icons ? "static" : "animated") + "/" + this.weatherIcons[this.current.conditions] + ".svg")}) no-repeat; background-size: contain;">${this.current.conditions}</span>

ここでも、アニメーション アイコンのコードを追加します。

           <div class="forecast clear">
              ${this.forecast.map(daily => html`
                <div class="day fcasttooltip">
                  <span class="dayname" id="fcast-dayName-${daily.dayIndex}">${(daily.date).toLocaleDateString(this.config.locale,{weekday: 'short'})}</span>
                  <br><i class="icon" id="fcast-icon-${daily.dayIndex}" style="background: none, url(${this._hass.hassUrl("/local/icons/weather_icons/" + (this.config.static_icons ? "static" : "animated") + "/" + this.weatherIcons[this._hass.states[daily.condition].state] + ".svg")}) no-repeat; background-size: contain;"></i>

私は完全に機能している SVG アイコンを持っており、PC のクロムで機能します。

助けてくれてありがとう

4

0 に答える 0