我希望紫色背景色可以覆盖整个页面,但是背景色在图像之前会被截断。 您如何解决呢?
HTML
Our Team
The iGEM Team is comprised of 32 ppl.
CSS(更新代码)
html, body {
margin: 0;
padding: 0;
height: 100%;
}
.section {
background-image: linear-gradient(137deg, #D0BAFF 0%, #AD8BF6 27%, #AA88FE 52%, #B77BF6 73%, #D7AAEB 100%);
}
.about {
padding-top: 7%;
position: relative;
}
.about .description {
margin-left: auto;
margin-right: auto;
}
.about .title {
margin-left: auto;
margin-right: auto;
text-align: center;
}
.aboutImage {
position: absolute; /*absolute means object will be relative to the next parent element with relative (or absolute) positioning.*/
}