Offset viewable image in

前端 未结 5 1438
时光取名叫无心
时光取名叫无心 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

    This is an old question, but it was the first one that came up when I googled the question, so I thought I would mention the answer that, in my opinion, actually solves the original problem how to emulate background-position attribute. The answer I found is to use CSS attributes object-position and object-fit. For example like this:

    
    

    This will show the third thumbnail in the first row (assuming the thumbnails are arranged in a regular grid 32 x 32 pixels).

提交回复
热议问题