我想在页脚中并排放置一个 div,但使用此代码会留下白色边框。
<!DOCTYPE html>
<html lang="en">
<head>
<style type="text/css">
#bottomnav {
background-color: #333;
opacity: 1;
height: 100px;
left: 0;
right: 0;
bottom: 0;
overflow: visible;
}
</style>
</head>
<body>
<footer>
<div id="bottomnav">
Hello
</div>
</footer>
</body>
</html>
最佳答案
根据您的描述,我无法完全判断您遇到了什么问题,但我猜这是 body
元素上的边距。试试这个:
body {
margin: 0;
}
关于html - 为什么页脚 div 中有白色边框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15959815/