顶部显示div的高度设置为0%时

时间:2018-11-20 19:20:28

标签: css css3

我的导航栏位于下面,带有以下CSS:

#myFirstNav {
display: flex;
position: fixed;
bottom: 0;
left: 0;
right: 0;
justify-content: space-around;
padding: 10px;
background-color: black;
}

然后,当您单击#myFirstNav中的链接中的一个时,会弹出一个覆盖菜单。它具有以下CSS:

.overlay {
height: 0;
right: 0;
position: fixed;
z-index: 1;
left: 0;
bottom: 0;
overflow-x: hidden;
background-color: white;
transition: 0.5s;
border: 2px solid rgb(204, 204, 204);
border-bottom: 0;
}

让我困扰的是#overFirst上的2px边框显示在#myFirstNav背景上。无论如何,是否需要将.overlay div下移2px,以使边框不会出现在#myFirstNav背景上?

The padding showing at the bottom

0 个答案:

没有答案