html - 允许图像比包含 div 更宽

标签 html css internet-explorer-8

有什么方法可以使 div 不扩展它的宽度,而是在 IE8 中制作一个在 div 之外可见的图像?例如,我的 div 可能是 200px 宽,但图像是 250px 宽。

最佳答案

您可以将图像定位为“绝对”吗?

div > img {position:absolute;}

关于html - 允许图像比包含 div 更宽,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8970682/

相关文章:

javascript - 如果 <ul> 的长度超过屏幕宽度,则 <li> 元素转到下一行

html - 边界半径属性不起作用

javascript - 有没有办法使用 YepNope.js 为脚本提供动态名称?

html - IE中的上标下划线

css - IE8 : Translucent background color but opaque background image

html - 增加网站文本的字距

HTML:由于包装器,页面背景图片链接不起作用

html - 防止 float 换行并在需要时强制文本溢出

html - CSS 背景源在 IE8 + Vista 中获取 'flashy'

javascript - “控制台”是 Internet Explorer 的未定义错误