📜  html 背景图片适合屏幕 - Html 代码示例

📅  最后修改于: 2022-03-11 14:52:53.942000             🧑  作者: Mango

代码示例4
html {
    height: 100%;
}
body {
    color: #999;
    background: url('../images/background/main_bg.jpg') no-repeat center center fixed;
    font-family: 'Roboto', sans-serif;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}