我有一个图像,我想在Chrome浏览器中使用CSS在图像底部下方反映出来。 图像是在div内,我约束了图像的最大高度和最大宽度。css反映了麻烦 - 反映了图像的错误部分
反射图像显示图像的顶部而不是图像的底部。
这里是工作示例的链接:go
下面是代码:
<!DOCTYPE HTML>
<html>
<head>
<style>
img{
-webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(50%, transparent), to(rgba(255,255,255,0.2)));
max-height:315px;max-width: 220px;
}
div{overflow:hidden;height:275px;border:1px solid green}</style>
</head>
<body>
<div>
<img src="http://www.oracledigital.com.au/wp-content/uploads/2012/05/google-penguin-update.png" />
</div>
</body>
</html>
谁能帮我解决这个问题?
div高度实际上并未引起问题。如果您移除img上的最大高度和最大宽度,则图像反映得很好。 – bartski 2012-08-09 07:07:51
我需要溢出:隐藏。你有这个解决方案吗? – bartski 2012-08-12 15:13:59
所有的诚实我都不知道......我注意到,如果你删除图像的“高度/宽度”或“最大高度/最大宽度”,它会按照你的要求工作,但我猜你也需要这个。也许如果你事先调整图像大小? – finlaybob 2012-08-13 12:37:56