css3 讓div圖片滿版?
巴扎黑
巴扎黑 2017-04-17 11:48:16
0
5
536

如何讓p裡面的圖片滿版呀?

    background-image: url(.jpg);
    background-size: cover;
    

這樣用智能手機看圖片仍然沒有滿版呀
怎麼樣讓圖片能夠100%放大?
就是寬度是100% 高度也是100% 變形無所謂(不變形更好)

巴扎黑
巴扎黑

reply all(5)
洪涛

Note: You need to set the height of the element you fill with the background, as well as the height of its parent tag, body, and html to 100%, otherwise it will not be displayed

PHPzhong

You need to specify both width and height to fill the screen size

Ty80
background-size:100% 100%
Peter_Zhu

If you need it urgently, use css to make the picture width and height 100%

刘奇

If you want the p container to fill the screen, its background will fill the screen~~~

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template