How to use responsive background image in css3 in bootstrap

后端 未结 7 1447
猫巷女王i
猫巷女王i 2020-12-25 09:47

I dont want to use html tag. This is my css. I am using bootstrap 3.0.

background:url(\'images/ip-box.png\')no-repeat;
background-size:100%;
height: 140px;
         


        
相关标签:
7条回答
  • 2020-12-25 10:48

    The file path 'images/ip-box.png' implies that the css file is at the same level as the images folder.

    It's probably more common to have 'images' and 'css' folders at the same level as the 'index.html' file.

    If that were the case and the css file were one level down in its respective folder, then the path to ip-box.jpg as specified in the css file would be: '../images/ip-box.png'

    0 讨论(0)
提交回复
热议问题