为什么Chrome中的图片宽度不超过500像素? [英] Why are the images no wider than 500px in Chrome?

查看:231
本文介绍了为什么Chrome中的图片宽度不超过500像素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用常规的,相当宽的Google Chrome浏览器,请参阅 http://abmphotography.beta.cjbm .net/aileen-kevin

Using a regular, reasonably wide Google Chrome browser, see http://abmphotography.beta.cjbm.net/aileen-kevin

图像的高度是在CSS中定义的,但是宽度应该是自动的.似乎可以使用纵向图像,但横向图像最大宽度不能超过500px.

The height of the images is defined in CSS, but the width should be automatic. It seems to work with the portrait images, but the landscape ones are limited to a maximum of 500px wide.

有人可以照亮吗?

推荐答案

科林,您正在将两个选择器上的最大宽度设置为100%:

Colin, you are setting the max-width to 100% on two selectors:

img
.thumbnail > img

这使图像与容器一样大,因此不允许您寻求扩展.与其他浏览器一样,在Chrome上禁用 max-width 属性可以使图像适合您的期望高度.

This is making the image as large as the container, thus not allowing for the expansion you seek. Disabling the max-width properties on Chrome made the image fit the height as you would expect, as it should on other browsers too.

这篇关于为什么Chrome中的图片宽度不超过500像素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆