固定在屏幕的某个位置不随页面进行滚动
#t
{
position: fixed;
width: 40px;
height: 40px;
background: #eee;
bottom: 10px;
right: 10px;
background-color: #DCFCE9;
border: 1px double #06F867;
text-align: center;
padding: 0px;
margin: 0px;
z-index: 999;
}
<div id="t" onclick="showcd()">
top
</div>