我一直在试图阻止我的线性梯度重复,我的代码看起来是正确的,但我遗漏了一些东西。由于某些原因,它不断重复自己,甚至使用了no-repeat标签。非常感谢你能看一看!
我已经尝试将html标签添加到css,添加了background-size:cover,...
body,
html {
font-size: 95%;
text-align: center;
background: linear-gradient(360deg, #1C1C1C 10%, #494949 360%), no-repeat;
background-size: cover;
}
发布于 2019-08-08 11:11:51
html {
font-size: 95%;
text-align: center;
background: linear-gradient(360deg, #1C1C1C 10%, #494949 360%) no-repeat;
background-size: cover;
height:100%;
}
<body>
<h1>test</h1>
</body>
在no-repeat
之前有额外的,
删除,
并立即尝试。
body ,html{
font-size: 95%;
text-align: center;
background: linear-gradient(360deg, #1C1C1C 10%, #494949 360%) no-repeat;
background-size: cover;
}
https://stackoverflow.com/questions/57411215
复制