我有一個標題和一個可滾動的長內容。我希望標題不可滾動。我試着將overflow: hidden
設置爲標題,但沒有成功。如何將標題移出滾動區域?
如何將標題移出滾動區域?
段:
<body>
<div style="overflow: hidden">Header</div>
<div style="overflow: scroll">Content - very long Content...
我也嘗試在身體中設置樣式 - 沒有成功。
我知道有a way to make the header fixed using position fixed,但我不想使用它,因爲它需要知道頭部的提前高度(保證金)。這需要大小重複,並且如果頭部更復雜,則需要計算。
相關:http://stackoverflow.com/q/3593594/435605 –