HTML & CSS

Reordering grid items

Reordering grid items – re-ordering elements with Bootstrap4

html

<hr>
<div class="container">
  
  <ul class="list-unstyled">
    <li class="media">
      <div class="order-md-2">
        <i class="fas fa-battery-empty fa-2x bg-primary p-3 mx-3 rounded-lg text-light   "></i>
      </div>
      <div class="media-body text-md-right order-md-1">
        <h5 class="mt-0 mb-1"><span class="w900">List-based</span><span class="w400">media object</span></h5>
        Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
      </div>
    </li>
    <li class="media my-4">
      <div class="order-2 order-md-1">
        <i class="fas fa-battery-quarter fa-2x bg-secondary p-3 mx-3 rounded-lg text-light"></i>
      </div>
      <div class="media-body order-1 order-md-2">
        <h5 class="mt-0 mb-1"><span class="w900">List-based</span><span class="w400">media object</span></h5>
        Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
      </div>
    </li>
    <li class="media">
      <div class="order-md-2">
        <i class="fas fa-battery-half fa-2x bg-secondary p-3 mx-3 rounded-lg text-light"></i>
      </div>
      <div class="media-body text-md-right order-md-1">
        <h5 class="mt-0 mb-1"><span class="w900">List-based</span><span class="w400">media object</span></h5>
        Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
      </div>
    </li>
  </ul>
  
</div>
<hr>

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다