gpt4 book ai didi

html - Bootstrap Jumbotron 背景图像不起作用

转载 作者:行者123 更新时间:2023-11-28 02:30:03 25 4
gpt4 key购买 nike

我已经在我的网站上添加了一个超大屏幕,我正在尝试更改它的背景图片,但它不起作用。我 100% 肯定图像路径是正确的。这是我的代码:

<div class="jumbotron" style="background-image: url("images/aezakmi.jpg"); background-size: contain;">
<h1 class="display-4">Hello, world!</h1>
<p class="lead">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
<hr class="my-4">
<p>It uses utility classes for typography and spacing to space content out within the larger container.</p>
<p class="lead">
<a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>
</p>
</div>

最佳答案

我对 HTML 还是有点陌生​​,但如果我没记错的话,通常 url() 方法不需要引号。尝试使用带引号和不带引号的实际 HTTP url,看看哪个有效。如果它仍然不起作用,请尝试将您的图像移动到一个新目录,或者简单地将它上传到 imgur 或其他东西,以便您可以使用 HTTP url 获取它。

希望这对您有所帮助。

关于html - Bootstrap Jumbotron 背景图像不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51270056/

25 4 0
文章推荐: html - 如何通过从列表中选择日期来显示信息
文章推荐: css - webpack 2.7 不会加载 blueprintjs 核心 css
文章推荐: javascript - HTML:将
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com