Css div setting overflow-x: scroll horizontal scrolling is invalid

I set overflow-x: scroll for the outermost div. When you want the span inside to exceed, scroll horizontally and find that the effect is still scrolling up and down. How to layout
html

in this case?
<div class="shopCouponBor">
            <span class="shopCouponString">99940</span>
            <span class="shopCouponString">99940</span>
            <span class="shopCouponString">99940</span>
            <span class="shopCouponString">99940</span>
            <span class="shopCouponString">99940</span>
            <span class="shopCouponString">99940</span>
            <span class="shopCouponString">99940</span>
</div>

css

.shopCouponBor {
  width: 450px;
  height: 30px;
  float: right;
  overflow-x: scroll;
/*  overflow-x:auto;
  overflow-y:hidden;*/
}
.shopCouponString {
  height: 28px;
  line-height: 28px;
  font-size: 17px;
  color: -sharpFF9F9F;
  border: 1px solid -sharpFF9F9F;
  background: -sharpFFF1F1;
  padding: 0 10px;
  border-radius: 3px;
  margin-right: 15px;
}

clipboard.png

Jul.09,2021

overflow-x and overflow-y need to be set at the same time, or set uniformly with overflow .

your are inline elements that automatically fold when they encounter boundaries, so horizontal scrolling does not occur. If your goal is to scroll horizontally, add white-space: nowrap to the container element.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e45f4b-44b6a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e45f4b-44b6a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?