html - Offset viewable image in <img> tags the same way as for background-image -
plain & lt; Img & gt; It is possible to offset the image in the same way as you can with CSS background image and background-position?
There are main images on this page and when these two separate thumbnails are loaded (thus the bandwidth is increasing) there are some picture diagrams and some scenarios, although I display thumbnails at the same size Need to do (and crop more and more, where it fails to meet the desired aspect ratio).
Although it is possible to use other tags and backgrounds - CSS values are plain & lt; Img & gt; Tags will be better.
Unfortunately, this is only a & lt; Img & gt;
Tags
CSS background-image
a & lt; Div & gt; Create
. Where the image is applied as a background-image asset:
& lt; Div class = "thumbnail" style = "background: url (an-image.jpg) no-repeat 50% 50%" & gt; & Lt; / Div & gt;
CSS clippings
Use the clip-path
property to show only a part of the image :
& lt ;! - Clip properties are top, right, bottom, left and define a rectangle with its top-left and bottom-right points - & gt; & Lt; Div style = "clip-path: inset (10px 200px 200px 10px)" & gt; & Lt; Img src = "an-image.jpg" & gt; & Lt; / Div & gt;
You can read more about it.
Comments
Post a Comment