需要图像来溢出 Internet Explorer 中的 Div
我有一个名为 .header
的 div 类,高度为 30px。
在 .header div
中,我有一个图像我想要从中溢出。
该图像高 50 像素,在 Chrome 和 Firefox 中会溢出。
为什么它在 Internet Explorer 中不会溢出? .header div
只是扩展到 50px,因此不再溢出。
I have a div class I named .header
with a height of 30px.
Within the .header div
I have an image I want to overflow out of it.
The image is 50px tall and it overflows in Chrome and Firefox.
Why does it not overflow in Internet Explorer? The .header div
just expands to the 50px so it no longer overflows.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您希望它在所有浏览器中工作,您可以为 div 提供背景图像
,或者如果您希望内容溢出 div 尝试
if you want it to work in all browsers you could give the div a background image for example
or if you want the content to overflow out of the div try
对于 IE,您需要将包含图像或图像本身的 div 设置为:
这应该可以正常工作并显示图像的溢出。
For IE you need to set the div containing the image or the image itself to:
That should work fine and display the overflow of the image.