Get the size of background-image with jQuery after containing with CSS

前端 未结 6 1005
渐次进展
渐次进展 2021-01-22 00:16
#img {
    width:300px;
    height:300px;
    overflow:hidden;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-si         


        
6条回答
  •  自闭症患者
    2021-01-22 00:39

    You can not find the height width background image.there is no way that css can find the properties like height width of background images.what you can do is load the images using javascript or jquery and then getting height/width of those images.

提交回复
热议问题