gpt4 book ai didi

css - 响应式 Bootstrap Logo 图像

转载 作者:行者123 更新时间:2023-11-28 08:01:21 26 4
gpt4 key购买 nike

我的 Logo 图像在移动设备上看起来像这样:

enter image description here

我希望它自动变小,所以我添加了这个 css:

img {
display: inline-block;
height: auto;
max-width: 100%;

<div class="container">

<div class="row">
<div class="col-lg-12 text-center img-responsive">
<img src="http://placehold.it/600x140" alt="logo" style="margin-bottom: 30px;" />

</div>

但是它不起作用,有人可以帮助我吗?

最佳答案

如果你想让你的图像通过 bootstrap 响应,你必须直接在图像中应用类

<img class="img-responsive" src="http://placehold.it/600x140" alt="logo" style="margin-bottom: 30px;" />

关于css - 响应式 Bootstrap Logo 图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29741340/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com