When the data selected by while is paired with css, the last css customer of while?

  .swiper{
    vertical-align: top;
    width: 82%;
    display: inline-block;
    margin: 0px 0px 20px 20px;
    white-space: normal;
  }
<? while ($row = mysqli_fetch_array($sql)){?>
    <div class="swiper"></div>
<? }?>

the last moment of this while

swiper I want to change the style
change margin: 0px 0px 20px 20px; to margin: 0px 20px 20px 20px;
but all variables before the last one remain unchanged.
what can I do?

Jun.25,2021
Menu