我目前正在開發一個使用 unsplash 影像集合的反應頁面。我使用<img src="https://source.unsplash.com/random/?Cryptocurrency/" alt="如何從 unsplash 獲取多個隨機影像以顯示在我的網站上?"/>標簽來顯示頁面上每個內容的影像。但是,它為每條內容顯示相同的影像。我嘗試查看 unsplash 網站上的檔案,但無法解決問題。任何關于從哪里開始的建議將不勝感激。
uj5u.com熱心網友回復:
<img alt="crypto" src="https://source.unsplash.com/random/?Cryptocurrency&1">
<img alt="crypto" src="https://source.unsplash.com/random/?Cryptocurrency&2">
如我的示例所示,為每個影像添加一些隨機的不同引數,它可以作業。
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/453208.html
標籤:javascript html 反应
