【问题标题】:Is there a way to clip an image in an image container div?有没有办法在图像容器 div 中剪辑图像?
【发布时间】:2015-02-11 23:48:16
【问题描述】:

如何剪辑包含在图像容器 div 中的图像? 我为图像和图像容器尝试了overflow-y:hidden

【问题讨论】:

  • 如果可能的话,您将不得不提供更多详细信息,例如 html、css 代码和 jsfiddle

标签: css image


【解决方案1】:

更改容器尺寸。然后使用绝对定位来改变图片的位置。

<div class=container> //position:relative
<img src="example.png" /> //position:absolute
</div>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-08-28
    • 2015-01-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-19
    • 1970-01-01
    • 2022-06-14
    相关资源
    最近更新 更多