我之前有一個問題,我想expand a div from the center of the body。它工作正常,直到我遇到這種情況,其中正文的內容足夠長,滾動條現在顯示。從視口中心展開div
關於此jsFiddle的注意事項是,當我滾動到底部或只是中途點擊頁面上的任何位置時,展開的div將顯示在頁面的最頂部。
我知道這下面的CSS代碼有什麼用它做:
.growme {
background-color: #990000;
height: 0;
width: 0;
position: absolute;
filter: alpha(opacity=0);
opacity: 0;
top:0;
left:0;
bottom:0;
right:0;
margin:auto;
}
我怎麼能做出格在視口右側正好擴大無論在哪裏,我滾動?
沒想到那個!哈!非常感謝@Goowik – basagabi