【发布时间】:2019-06-24 04:29:38
【问题描述】:
我当前的代码似乎形成了一种模式,而不是覆盖整个页面。如何让它覆盖整个页面而不是像描绘一样的图案?
<style>
body {
background: linear-gradient(120deg, #211B53, #ECE3E6);
width: 100%;
height: 100%;
}
#para1 {
text-align: center;
font-size: 600%;
color: black;
}
div.absolute {
position: absolute;
bottom: 10px;
left: 10px;
}
</style>
<p id="para1"> ARTWORK</p>
<div class="absolute"> All sales final. </div>
【问题讨论】:
-
而不是body height:100% set body min-height:100vh;
-
或者只为html设置100%的高度
标签: html css colors background