why images cards component being used background instead of image fill media portion of card? cant use image tag instead?
i trying use mdl framework make tumblr template having trouble implementing card component images posts since tumblr uses image tags
please explain why mdl using images backgrounds card component
nothing holding using img tag. see this example.
however using images background of divs has advantages:
- right clicking on image not allow download image
- you have more flexibility in terms of responsiveness (e.g. using
background-size: coverfilldiv). update: though can set 100% on width/height adapt image,coverkeeps aspect ratio , in general provides better results. - since image background don't need set position
absolutelet other elements insidedivpositioned on image (as case in of mdl examples)
Comments
Post a Comment