scss水平显示

xoshrz7s  于 2021-09-23  发布在  Java
关注(0)|答案(0)|浏览(240)

我的代码如下所示:

  1. <div class="container">
  2. <button class="leftbutton"> // these buttons control horizontal scrolling
  3. <ul class="scrollbar">
  4. <button class="rightbutton">
  5. </div>

我的造型是这样的:

  1. .scrollbar{
  2. list-style: none;
  3. margin: 0;
  4. display: grid;
  5. grid-auto-columns: max-content;
  6. overflow: hidden;
  7. scroll-behavior: smooth;
  8. padding: 0;
  9. }
  10. .container{
  11. position: relative;
  12. }
  13. .leftButton {
  14. position: absolute;
  15. top: 0;
  16. left: 0;
  17. }
  18. .rightButton {
  19. position: absolute;
  20. top: 0;
  21. right: 0;
  22. }

问题是滚动条的内容覆盖了左侧按钮。你知道怎么解决这个问题吗?谢谢

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题