“。fullpage”块和内容上的滚动条出现问题。由于顶部菜单的缩进高度为30px,底部内容也使视图保持在相同的30像素上。怎么做?
P.S。从外部看,页面看起来应该完全一样。顶部菜单应与常规内容分开。
# compose_dataset.py file
from src.util.misc import function_name
已添加:由于某种原因,顶部菜单已不再透明。内容在其下方完全消失,好像rgba不能透明工作(
答案 0 :(得分:0)
问题解决了!
html {
height: 100%;
margin: 0;
}
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
background-color: rgba(0, 0, 0, 0.35);
}
::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: rgba(255, 255, 255, 0.25);
}
body {
height: 100%;
width: 100%;
margin: 0;
background-color: #141320;
color: white;
z-index: 99998;
}
.draggable {
-webkit-app-region: drag;
}
button {
-webkit-app-region: no-drag;
}
.fullpage {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
overflow-y: scroll;
}
.topmenu {
top: 0;
overflow: hidden;
width: 100%;
height: 30px;
position: fixed;
background-color: rgba(255, 255, 255, 0.05);
z-index: 99999;
}
.content {
margin-top: 30px;
}
.center {
display: flex;
justify-content: center;
align-items: center;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
position: absolute;
}
.center .btn {
border-radius: 4px;
margin: 7px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="fullpage">
<div class="topmenu draggable"></div>
<div class="content">
123123123
<div class="center">
<button class="btn btn-info">Test</button>
<button class="btn btn-primary">Test 2</button>
<button class="btn btn-success test">Test 3</button>
</div>
<div style="margin-top: 1400px; width: 50px; height: 60px; background-color: aqua;"></div>
</div>
</div>
</body>
</html>