Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试进行简单的聊天。一切正常,但是当消息到达容器底部时,滚动出现并隐藏了最后一个溢出的元素......这是正常的。我想知道是否可以仅使用 CSS 而不使用 JavaScript 来显示最后一个元素?
在最后一个元素上使用一些填充或边距,然后它将显示在底部滚动条的高度之上。这可能会奏效:
p:last-child { margin-bottom: 32px; }