我想在一個靜態網站上獲取一個簡單的Bootstrap卡,我在Vue.js中製作。我正在使用Bootstrap-Vue。不過,當我使用b-card
和img
屬性時,我似乎無法看到圖像。這裏是一個卡上的文件:Bootstrap-Vue卡組件圖像不會呈現
https://bootstrap-vue.js.org/docs/components/card
這裏是我的代碼是不顯示圖像(所有其他文本渲染,甚至GitHub的圖標)
<b-card img="`../assets/q1.png`" title="7 Little Words" class="mb-2 col-md-6">
<!--The image above is not showing-->
<h5 :style="{fontSize:1.3+'em', marginTop:20+'px'}">An addictive vocabulary puzzle for word nerds</h5>
<div class="demo">
<a href="" :style="{marginBottom:10+'px'}">VIEW DEMO</a>
</div>
<div class="github">
<h4>Github</h4>
<!--This image below is showing-->
<a href=""><img src="../assets/GitHub.png" alt="GitHub"></a>
</div>
</b-card>
我認爲這必須與b-card
中的img
屬性有關,但我不知道如何解決該問題。另外,這裏是我的控制檯錯誤:
http://localhost:8080/assets/q1.png 404(未找到)
我試過這個,但它仍然在說圖像沒有找到... – lnamba