我这里有一个图像大小的问题:http://goo.gl/UYUuJL使图像缩放,以便图像高度按比例填充div "pika-stage“的100%。我很抱歉,这个问题已经在其他地方得到了回答。
下面是CSS:
.pika-stage {
position: relative;
text-align: center;
height: auto;
max-height: 410px;
overflow: hidden;
background: #000;
}
.pika-stage img {
height: 100% !important;
position: relative;
}以这个图库最右上角的缩略图为例:原始大小:1364**2921(腿上应该有一头大象)。一旦点击了缩略图,它就不会缩放图像,无法按比例将整个图像放入"pika-stage“div中。这种缩放方式会被媒体图像大小覆盖吗?任何帮助都将不胜感激。
谢谢
发布于 2013-10-08 10:57:27
将height: 100%定义为.pika-stage,而不是height: auto;
.pika-stage {position: relative; text-align:center; height:100%; max-height:410px; overflow:hidden; background: #000;}https://stackoverflow.com/questions/19238199
复制相似问题