背景颜色整页 [英] background color full page
本文介绍了背景颜色整页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我当前的代码似乎是在制作图案,而不是覆盖整个页面.如何使其覆盖整个页面,而不是像描述那样的图案?
My current code seems to make a pattern instead of covering the entire page. How do I make it to cover the entire page instead of a pattern like depiction?
<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>
推荐答案
使用渐变时,请确保使用正确的CSS
When using gradient make sure you use correct css to go along with it
body {
background: linear-gradient(120deg, #211B53, #ECE3E6);
width: 100%;
min-height:100vh;
background-size: cover;
}
#para1 {
text-align: center;
font-size: 600%;
color: black;
}
div.absolute {
position: absolute;
bottom: 10px;
left: 10px;
}
<p id="para1"> ARTWORK</p>
<div class="absolute"> All sales final. </div>
你很好走!!
这篇关于背景颜色整页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文