How to use responsive background image in css3 in bootstrap

后端 未结 7 1466
猫巷女王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:44

    I found this:

    Full

    An easy to use, full page image background template for Bootstrap 3 websites

    http://startbootstrap.com/template-overviews/full/

    or

    using in your main div container:

    html

    css:

    .full {
        background: url('http://placehold.it/1920x1080') no-repeat center center fixed;
        -webkit-background-size: cover;
        -moz-background-size: cover;
        background-size: cover;
        -o-background-size: cover;
        height:100%;
    }
    

提交回复
热议问题