Using CSS Clip with percentage

前端 未结 4 2075
予麋鹿
予麋鹿 2021-02-19 05:28

I\'m trying to display only the top half of an image and the bottom half of the same image in 2 separate divs.

I\'ve tried with the CSS property clip, but i

4条回答
  •  再見小時候
    2021-02-19 06:05

    If you are using fixed height images and fixed height div, and you are doing this manually, why not put the image as a background, with overflow:hidden and proper background-position so it only shows the top one from the top down and bottom one from the bottom up?

提交回复
热议问题