Size the DIV to the size of the background image

后端 未结 3 727
失恋的感觉
失恋的感觉 2020-12-06 23:01

I have a DIV with the following style

.vplayer-container .logo
{
 position: absolute;
 bottom: 50px;
 right: 10px;
 background: url(../img/logo.png) no-repea         


        
3条回答
  •  一生所求
    2020-12-06 23:35

    This is impossible with pure CSS. I think you need to do it with JavaScript. Do you really need this to be dynamic? I think it is less work to change two values in the stylesheet if the logo changes.

提交回复
热议问题