時間:2023-09-01 12:06:01 | 來源:網(wǎng)站運營
時間:2023-09-01 12:06:01 來源:網(wǎng)站運營
css如何讓背景圖片平鋪?css背景圖片平鋪四種方式介紹:在網(wǎng)頁設(shè)計的過程中,有時候可能會要求背景圖片平鋪,因為這樣會讓整個網(wǎng)頁看起來比較好看,圖片平鋪可以不用具體設(shè)置body寬度和高度大小,就可以直接將圖片平鋪整個頁面,那么,如何讓背景圖片平鋪呢?接下來本篇文章將給大家來介紹關(guān)于css讓背景圖片平鋪的方法,有需要的朋友可以參考一下。<html><head><style type="text/css"> #content { border:1px solid #000fff; height:500px; background-image:url(http://img12.3lian.com/gaoqing02/01/58/85.jpg); background-repeat: no-repeat; } </style><div id="content"></div> </body></html>
css背景圖片平鋪效果如下:<html><head><style type="text/css"> #content { border:1px solid #000fff; height:500px; background-image:url(images/tu.jpg); background-repeat: no-repeat; } </style><div id="content"></div> </body></html>
css背景在X及Y軸方向均不平鋪效果如下:<html><head><style type="text/css"> #content { border:1px solid #000fff; height:500px; background-image:url(images/tu.jpg); background-repeat: repeat-x; } </style><div id="content"></div> </body></html>
css橫向平鋪背景效果如下:<html><head><style type="text/css"> #content { border:1px solid #000fff; height:500px; background-image:url(images/tu.jpg); background-repeat: repeat-y; } </style><div id="content"></div> </body></html>
css縱向平鋪背景效果如下:關(guān)鍵詞:圖片,背景,方式
微信公眾號
版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。