我有垂直滚动的div。问题是当div加载时它会显示div的底部而不是顶部。不能让它显示在顶部。有什么建议吗?
单击时激活它的Javascript代码:
var pbody = document.getElementById("pbody");
pbody.style.display = "block";
HTML:
<div id="pbody">
text stuff
</div>
CSS:
#pbody {
display: none;
position: relative;
width: 800px;
height: 2000px;
background-color: black;
border-radius: 100px;
margin: auto;
margin-top: 10px;
overflow: hidden;
z-index: 200;
color: white;
text-align: center;
}