我想在一个静态网站上获取一个简单的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