inline css background-size cover

前端 未结 2 649
南笙
南笙 2021-01-13 16:27

i\'m having the following css code

.imgf{
    background: url(/thatscooking/FotoTC/FotoTC/ALWIN01.JPG) no-repeat center center ; 
    -webkit-background-siz         


        
相关标签:
2条回答
  • 2021-01-13 17:06

    You need to use single style tag.

    <div style="background: url(/thatscooking/FotoTC/FotoTC/ALWIN01.JPG) no-repeat center center;
                background-size: cover;
                -webkit-background-size: cover;
                -moz-background-size: cover; 
                -o-background-size: cover;" 
        class="imgf ">
    <div id="naamb"><p>Album Naam</p></div></div>
    
    0 讨论(0)
  • 2021-01-13 17:24

    Use this code, cleaner than @RAS version:

    background: url(image.jpg) no-repeat center center / cover;
    
    0 讨论(0)
提交回复
热议问题