你可能做不到。这很接近。如果下方有空间,您将不会得到周围流动的内容。
.stuck { position: fixed; top: 10px; left: 10px; bottom: 10px; width: 180px; overflow-y: scroll;}您也可以执行百分比高度:
.stuck { max-height: 100%;}
你可能做不到。这很接近。如果下方有空间,您将不会得到周围流动的内容。
.stuck { position: fixed; top: 10px; left: 10px; bottom: 10px; width: 180px; overflow-y: scroll;}您也可以执行百分比高度:
.stuck { max-height: 100%;}