body和html背景色区别

1.当body背景色设置为红色,html设置为图片时

复制代码
body {
     background-color: red;
 }

html {
    height: 100%;
    background: linear-gradient(rgba(196, 102, 0, 0.2), rgba(155, 89, 182, 0.2)),
    url("../imgs/register.jpg") no-repeat 100%;
}
复制代码

2.当html背景色设置为红色,body设置为图片时

复制代码
html {
     background-color: red;
 }

body {
    height: 100%;
    background: linear-gradient(rgba(196, 102, 0, 0.2), rgba(155, 89, 182, 0.2)),
    url("../imgs/register.jpg") no-repeat 100%;
}
复制代码

 

posted @   xxllj  阅读(371)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示