<div class="row"> <div class="col s3 offset-s9"> <form th:action="@{'/topics/'+${category}+'/1'}" method="get" class="form-inline pull-left" > <input type="text" name="titleName" value="" placeholder="请输入你要搜索的帖子名" style="width:65%;float:left;height:30px"/> <button class="btn btn-primary #9575cd deep-purple lighten-2 " style="float:right;width:30%;"><i class="large material-icons">search</i></button> </form> </div> </div>
查了很多原因,最后发现是没有设置长度,记录一下。