引导两个col-md,要显示同一行

时间:2020-02-21 21:39:00

标签: php bootstrap-4

正在加载我的网页,我想查看这些结果。
产品数量:---?---
(内联) 产品尺寸:---?---(内联)

但是我的结果是这样的 enter image description here

$(document).ready(function() {

   // get today's info

   var d = new Date();

   // get the hour of the day - between 1 & 24

   var time = d.getHours();
   
   // check if hour is at 7pm or later

   if (time >= 19) { 

     $('.background').css('background-color', '#000');
     
     // check if time is 7am or earlier

   } else if (time <= 7) {

     $('.background').css('background-color', '#000');
   } else {
     
     // you can remove this else statement is meant to demonstrate what would happen between 7am and 7pm if there was not a default
     
     $('.background').css('background-color', 'orange');
   
   }

});

1 个答案:

答案 0 :(得分:0)

我认为最好将其作为附加元素

<div class="input-group mb-3">
  <div class="input-group-prepend">
    <span class="input-group-text" id="basic-addon1">Products Quantity</span>
  </div>
  <select name="product_quantity" class="form-control">
     <option>1</option>
     <option>2</option>
     <option>3</option>
     <option>4</option>
  </select>
</div>