我给元素设置了背景颜色来区分它们。
可以为
Title
元素赋予 position: sticky;left: 0
。
<div id="list" style="width: 500px; height: 300px; overflow: auto;background:green;">
<div id="list_wrapper" style="width: 700px;background:red;">
<div class="row" style="width: 100%; height: 50px;">
<span style="display: inline-block; width: 200px;position: sticky;left: 0;background: blue;">Title</span>
<span>Content</span>
</div>
<!-- more rows -->
</div>
</div>