css3 - css scale background to a certain ratio of image -




is there css3 method of scaling background image of element ratio of image's dimensions?

all of documentation find when searching suggests 'background-size', when percentage given there, percentage of element background belongs. want scale relative size of background image itself.

is 1 need ? try link https://jsfiddle.net/beljems/dtxljmdv/. added padding percentage value top , bottom, no height required. , uses background-size:cover.

hope helps.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -