如何去除角落中的颜色?修复背景颜色
body {
border: 30px solid #fff;
border-radius: 50px;
background-color: blue;
background-attachment: fixed;
position: fixed;
width: 100%;
height: 100%
}
如何去除角落中的颜色?修复背景颜色
body {
border: 30px solid #fff;
border-radius: 50px;
background-color: blue;
background-attachment: fixed;
position: fixed;
width: 100%;
height: 100%
}
在你的HTML身体有以下几点:
<body>
<div>
<!-- all other body html here -->
</div>
</body>
然后在你的CSS使用:
body {
position: fixed;
width: 100%;
height: 100%
}
body > div {
height: 100%;
width: 100%;
background: blue;
border: 30px solid #fff;
border-radius: 50px;
}
的jsfiddle:https://jsfiddle.net/d7bd5fjm/
感谢您的帮助 –
你可以增加边框像素大小,它会掩盖角落
我不明白,请用代码显示? –
您应该添加一个额外的div标签,并添加背景颜色了,而不是在身体标签。
我不明白,请用代码显示? –
TRY,
body {
border: 20px solid #fff;
border-radius: 50px;
background-color: blue;
background-attachment: fixed;
position: fixed;
margin: -15px; //Pulling the border outwards.
width: 100%;
height: 100%
}
没有区别。 –
现在怎么样? @BatuhanAkkaya – DeeJay
而不是将它设置在body
,为什么不设置一个新的元素,像div
什么?但是,如果你坚持要保持它在身上,设置白上html
是这样做的一种方式......
html {
background: white;}
谢谢。如果问题出在身体上,我可以使用div。 –
请创建工作片段,使我们ç请参阅完整的代码。 –