<h3>Flex Wrap Property</h3>
<div class="wrapper">
            <div class="radio_tabs">

                <label class="radio_wrap" data-radio="radio_1">
                    <input type="radio" name="sports" class="input" checked>
                    <span class="radio_mark">
                        Nowrap
                    </span>
                </label>
                <label class="radio_wrap" data-radio="radio_2">
                    <input type="radio" name="sports" class="input">
                    <span class="radio_mark">
                        Wrap
                    </span>
                </label>
                <label class="radio_wrap" data-radio="radio_3">
                    <input type="radio" name="sports" class="input">
                    <span class="radio_mark">
                        Wrap-Reverse
                    </span>
                </label>
            </div>

            <div class="content">

                <div class="radio_content radio_1">
                    <h5> Flex Wrap : Nowrap</h5>
                    <div class="flex-wrap-nowrap">
                        <div class="flex-item-1">
                            1
                        </div>
                        <div class="flex-item-2">
                            2
                        </div>
                        <div class="flex-item-3">
                            3
                        </div>
                        <div class="flex-item-4">
                            4
                        </div>
                        <div class="flex-item-5">
                            5
                        </div>
                        <div class="flex-item-6">
                            6
                        </div>
                        <div class="flex-item-7">
                            7
                        </div>
                    </div>
                </div>
                <div class="radio_content radio_2">
                    <h5> Flex Wrap : Wrap</h5>
                    <div class="flex-wrap-wrap">
                        <div class="flex-item-1">
                            1
                        </div>
                        <div class="flex-item-2">
                            2
                        </div>
                        <div class="flex-item-3">
                            3
                        </div>
                        <div class="flex-item-4">
                            4
                        </div>
                        <div class="flex-item-5">
                            5
                        </div>
                        <div class="flex-item-6">
                            6
                        </div>
                        <div class="flex-item-7">
                            7
                        </div>
                    </div>
                </div>
                <div class="radio_content radio_3">
                    <h5> Flex Wrap : Wrap-Reverse</h5>
                    <div class="flex-wrap-reverse">
                        <div class="flex-item-1">
                            1
                        </div>
                        <div class="flex-item-2">
                            2
                        </div>
                        <div class="flex-item-3">
                            3
                        </div>
                        <div class="flex-item-4">
                            4
                        </div>
                        <div class="flex-item-5">
                            5
                        </div>
                        <div class="flex-item-6">
                            6
                        </div>
                        <div class="flex-item-7">
                            7
                        </div>
                    </div>
                </div>

            </div>
        </div>
*{
  margin:0;
  padding:0;
  box-sizing: border-box;
  font-family: 'Exo 2', sans-serif;
}
body{
  background-color: #fff;
}
.wrapper{
  width: 750px;
  height: auto;
  background-color: #f7f7f7;
  padding: 30px;
  margin: 15px auto;
}
.wrapper .radio_tabs{
  height: 60px;
  background-color: #fff;
  border-radius: 5px;
  margin-bottom: 10px;
  font-size:14px;
  padding: 18px;
  display: flex;
  box-shadow: 0 0 2px rgba(0,0,0,0.1);
}
.wrapper .radio_tabs label{
  margin-right: 15px;
  display: block;
  position: relative;
  cursor: pointer;
  padding-left:28px;
}
.wrapper .radio_tabs label .input:checked ~.radio_mark{
  color: #0075FF;
}

.wrapper .content{
  width: 100%;
  height: calc(100% - 70px);
  background: #fff;
  border-radius: 5px;
  padding: 18px;
  box-shadow: 0 0 2px rgba(0,0,0,0.1);
}



.flex-container{
  display:flex;
  background-color:teal;
  padding:10px;
  margin-bottom:50px;
}
.flex-item-1{
  width:150px;
  height:150px;
  line-height:150px;
  background-color:#A6E7FF;
  margin:5px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}
.flex-item-2{
  width:150px;
  height:150px;
  line-height:150px;
  background-color:#C8F1D6;
  margin:5px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}
.flex-item-3{
  width:150px;
  height:150px;
  line-height:150px;
  background-color:#E6D0F7;
  margin:5px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}
.flex-item-4{
  width:150px;
  height:150px;
  line-height:150px;
  background-color:#FFDDD3;
  margin:5px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}
.flex-item-5{
  width:150px;
  height:150px;
  line-height:150px;
  background-color:#00FFFF;
  margin:5px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}
.flex-item-6{
  width:150px;
  height:150px;
  line-height:150px;
  background-color:#C3CDE6;
  margin:5px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}
.flex-item-7{
  width:150px;
  height:150px;
  line-height:150px;
  background-color:#E6D0F7;
  margin:5px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}

.flex-wrap-nowrap{
  display:flex;
  flex-wrap: nowrap;
  background-color:teal;
  padding:10px;
  margin-bottom:50px;
  text-align: center;
}

.flex-wrap-wrap{
  display:flex;
  flex-wrap: wrap;
  background-color:teal;
  padding:10px;
  margin-bottom:50px;
  text-align: center;
}
.flex-wrap-reverse{
  display:flex;
  flex-wrap: wrap-reverse;
  background-color:teal;
  padding:10px;
  margin-bottom:50px;
  text-align: center;
}

h5 {
  margin-bottom: 15px;
}
h3{
  text-align:center;
  margin-bottom:0px;
  margin-top: 10px;
  font-size:30px;
  font-weight:bold;
}
$(document).ready(function () {
            // default hide all radio conteny
            $(".content .radio_content").hide();
            $(".content .radio_content:first-child").show();

            $(".radio_wrap").click(function () {
                var currrent_radio = $(this).attr("data-radio");
                $(".content .radio_content").hide();
                $("." + currrent_radio).show();
            });
        });

External CSS

  1. https://fonts.googleapis.com/css2?family=Exo+2:wght@300&amp;display=swap

External JavaScript

  1. https://code.jquery.com/jquery-3.5.1.js