Scroll to div with class on a button click
This question already has an answer here:
Do it old school, use anchors. Your buttons will all be <a href="#someElementId">
, and your targets should use an id
instead of (or in addition to) a class. No jQuery or JavaScript required.
上一篇: 如何自动在HTML中垂直滚动一行?
下一篇: 点击按钮,滚动到div类