Offset viewable image in

前端 未结 5 1422
时光取名叫无心
时光取名叫无心 2020-12-15 04:01

Using plain tags is it possible to offset the image in the same way as you can with CSS background-image and background-position?

There are main images o

5条回答
  •  爱一瞬间的悲伤
    2020-12-15 04:19

    Unfortunately no, it's not possible with only an tag. There are 2 solutions I can think of to your problem:

    CSS background-image

    Create a

    where the image is applied as a background-image property:

    CSS clipping

    Use the clip-path property to only show a section of the image:

    
    

    You can read more about it in this article.

提交回复
热议问题