简体   繁体   English

如何使我的图像响应?

[英]how to make my images responsive?

Hi all using twitters bootstrap: http://twitter.github.io/bootstrap/base-css.html#tables 大家好,都使用twitters引导程序: http : //twitter.github.io/bootstrap/base-css.html#tables

I am wandering how I can stop this happening: http://img823.imageshack.us/img823/6606/screenshotfrom201306071.png I want the images to resize with the window until it gets bumped up above the text from bootsrap. 我在徘徊如何阻止这种情况的发生: http : //img823.imageshack.us/img823/6606/screenshotfrom201306071.png我希望图像随窗口调整大小,直到它从bootsrap的文本上方突出为止。

Link for it: http://www.prxa.info/articles/category/1 User: test.prxa. 链接: http : //www.prxa.info/articles/category/1用户:test.prxa。 pass: test 通过:测试

I NEED images to have a max of 350px here as some images people include are massive and have to be resized to not mess it all up. 我需要此处的图片最大为350px,因为某些人包括的图片非常大,必须调整大小以免将其弄乱。

Here is my custom css for the thumbnail area and the images inside: 这是我对缩略图区域和内部图像的自定义CSS:

.thumbnail
{
    width: 350px;
    height: 220px;
    display: table-cell; 
    vertical-align: middle;
}

img.tagline-img
{
    max-width: 350px;
    max-height: 220px;
}

您使用Firefox的网站,宽度:100% Not the best responsive technique but it will make it fit 不是最好的响应技术,但它将使其适合

Just use 只需使用

img.tagline-img { 
   width:100%;
}

Just tested on your site 刚刚在您的网站上测试

taken from bootstrap : 取自bootstrap:

img{
    border:0;
    max-width:100%; /* Part 1:Set a maxium relative to the parent */
    width:auto\9; /* IE7-8 need help adjusting responsive images */
    height:auto; /* Part 2:Scale the height according to the width,
        otherwise you get stretching */
-ms-interpolation-mode:bicubic
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM