首页 > Web开发 > 详细

body和html背景色区别

时间:2018-06-12 19:20:19      阅读:233      评论:0      收藏:0      [点我收藏+]

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%;
}

技术分享图片

 

body和html背景色区别

原文:https://www.cnblogs.com/ccllj/p/9174575.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!