1
Q
每边溢出
A
回答
2
这里是做这件事的一种方法:
#container {
margin: 0 auto;
width: 800px;
height: 400px;
/*overflow: hidden;*/
position: relative;
border: 1px solid red;
}
#container img {
position: absolute;
margin: auto;
top: 0px;
left: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
/*transition: all 0.5s ease;*/
}
#container img:hover {
left: -5%;
width: 110%;
height: 110%;
}
添加left: -5%
到你的CSS规则img:hover
。
+0
得出同样的结论+1(简单而有效)。 –
相关问题
- 1. 边框溢出
- 2. 溢出到左边?
- 3. Firefox右边溢出?
- 4. shinydashboard边栏菜单溢出
- 5. 边界原因DIV溢出
- 6. 图像溢出边框
- 7. 溢出隐藏边框
- 8. 溢出:scroll;删除边框
- 9. div只在一边溢出?
- 10. CSS溢出:自动超出边界
- 11. 边框和溢出导致问题
- 12. Webkit上的溢出和圆角边框
- 13. 边框溢出背景颜色
- 14. HTML/CSS:IE8背景溢出边框
- 15. 流体的div溢出边境
- 16. HTML右边缘在android上溢出
- 17. 溢出:自动不移动边缘
- 18. 溢出可见不可见在右边
- 19. 避免表格边距溢出
- 20. 中画面溢出边缘(引导)
- 21. Android WebView内容溢出边框
- 22. 页面页边距SSRS报告溢出
- 23. 溢出:滚动; CSS添加边框到页面的边缘?
- 24. 需要溢出:一边可见光和溢出:隐藏在底侧
- 25. 每隔几秒就会自动溢出
- 26. JSON上的Callstack溢出。每个
- 27. 没有为每个元素溢出
- 28. CSS:显式声明每个项目的位置,填充,边距和溢出?
- 29. js溢出函数溢出
- 30. 弯曲的边缘没有出现溢出
如果你不关心IE 6,7,8,那么为什么不使用翻译来代替。 – Morven