javascript - Filling content from bottom and right to left order -


inside page have div want populate content it's on image. how can without shrinking div content , populate inside div bottom up?

enter image description here

best approach layout flexbox technique

you can wrap rows in reverse order using wrap-reverse

$(document).ready(function() {    $('.create').on('click', function() {      $('.container').append('<div class="circle"></div>');    })  });
.container {    display: -webkit-box;    display: -webkit-flex;    display: -ms-flexbox;    display: flex;    -webkit-box-orient: horizontal;    -webkit-box-direction: normal;    -webkit-flex-direction: row;    -ms-flex-direction: row;    flex-direction: row;    background: #6cc4da;    -webkit-flex-wrap: wrap-reverse;    -ms-flex-wrap: wrap-reverse;    flex-wrap: wrap-reverse;    align-items: baseline;    align-content: flex-start;    height: 280px;    width: 770px;  }  .circle {    background: #c78def;    border-radius: 50%;    width: 60px;    height: 60px;    margin: 5px;  }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>  <div class="container">    <div class="circle"></div>    <div class="circle"></div>    <div class="circle"></div>    <div class="circle"></div>    <div class="circle"></div>    <div class="circle"></div>    <div class="circle"></div>    <div class="circle"></div>    <div class="circle"></div>    <div class="circle"></div>  </div>  <button class="create">create circle</button>

jsfiddle


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -