2021年1月19日 星期二

UI Bootstrap Datepicker 和其他物件垂直置中方法

<table><tr >
<td>日期範圍 </td>
<td><span class="input-group" style="display:inline-block;width:125px;margin-bottom:-5px"><input runat="server" id="fromdate" uib-datepicker-popup="yyyy/MM/dd" ui-mask="9999/99/99" model-view-value="true" is-open="popup1.opened" type='tel' class='form-control' style="width: 90px;" ng-model="fromdate"><span class="input-group-btn"><button type="button" class="btn btn-default" ng-click="popup1.opened=true" title="選擇日期"><i class="far fa-calendar"></i></button></span></span></td>
<td>~</td>
<td> <span class="input-group" style="display:inline-block;width:125px;margin-bottom:-5px"><input runat="server" id="todate" uib-datepicker-popup="yyyy/MM/dd" ui-mask="9999/99/99" model-view-value="true" is-open="popup2.opened" type='tel' class='form-control' style="width: 90px;" ng-model="todate"><span class="input-group-btn"><button type="button" class="btn btn-default" ng-click="popup2.opened=true" title="選擇日期"><i class="far fa-calendar"></i></button></span></span></td>
<td> <button class="btn btn-default">查詢</button></td>
</tr></table>
※透過 table td 區隔各元素達到垂直置中
※針對 input-group 設定 margin-bottom:-5px 避免垂直偏差
※針對 input-group 設定 display:inline-block;width:125px 避免轉折

沒有留言:

自訂權限驗證機制

// 使用 filter [Route("api/[controller]")] [ApiController] [Authorize] [TypeFilter(typeof(CustomAsyncAuthorizationFilter))] public c...