gpt4 book ai didi

html - 尽管我已经设置了宽度,但为什么我的图像会缩小?

转载 作者:太空宇宙 更新时间:2023-11-04 00:08:26 26 4
gpt4 key购买 nike

我已经设置了宽度和高度,但它忽略了这一点,并显示为原始大小。为什么??? Bootstrap Css 正在阻止什么???

            <p class="responsive-img">  
<img alt="2011-08-16_20.01.51" class="img-polaroid" height="100" src="/system/user_avatars/1/thumb/2011-08-16_20.01.51.jpg?1355911975" width="100" />
</p>

最佳答案

是的,Twitter Bootstrap CSS 会覆盖 height 属性(并且,根据浏览器及其模式,还会覆盖 width 属性)。它设置了 height: autowidth: auto\9。 CSS 设置会覆盖 HTML 属性,因此您需要使用 CSS 来覆盖 Bootstrap 设置。在内联 CSS 中,您将使用

 <img ... style="width: 100px; height: 100px" ...>

但您也可以在 style 元素或外部样式表中使用样式表。 Bootstrap 代码使用 img 选择器,因此很容易被级联规则打败。

关于html - 尽管我已经设置了宽度,但为什么我的图像会缩小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14009854/

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