您的位置:首页 > Web前端 > BootStrap

bootstrap表单响应式输入文本框

2020-06-01 07:38 295 查看

输入文本框溢出,不会自动缩放

问题代码:

<form action="SeverletArticle?op=updateArticle" method="post">
<table border="" cellspacing="" cellpadding=""
class="table table-striped table-hover ">
<tr>
<th>文章编号</th>
<th>文章标题</th>
<th>文章内容</th>
<th>发表日期</th>
<th>作者编号</th>
</tr>
<tr class="gradeD">
<td><input type="text" id="id" name="id" readonly="readonly"  style="background-color: #B9BBBE;"/></td>
<td><input type="text" id="title" name="title" /></td>
<td><input type="text" id="articleContent"
name="articleContent" /></td>
<td class="center"><input type="text" id="date" name="date" /></td>
<td class="center"><input type="text" id="authorId"
name="authorId" /></td>
</tr>
</table>
<input type="submit" class="btn btn-secondary"  value="修改"></input>
</form>

解决问题关键代码:在input标签里面增加class="form-control"样式

<input type="text" id="title" name="title" class="form-control"/></td>

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: