使用 style="float:right"
代码如下
<div>
<select class="form-control" id="province_sel" name="province"> <?php if ($input['province']) { ?> <option value="<?= $input['province']; ?>"><?= $input['province']; ?></option> <?php } ?> <option value="">爬虫渠道</option> <foreach name="crawler_areas" item="province"> <option value="{$province}" >{$province}</option> </foreach> </select> <label class="control-label">Status:</label> <input type="text" class="form-control input-sm" name="status" value="{$input['status']}" placeholder="搜索Status"> </div> <div class="form-group" style="float: right"> <button type="submit" class="btn btn-sm btn-primary">查询</button> <button type="button" id="file_export" class="btn btn-sm btn-success">导出 </button> </div>