我正在使用bootstrap创建这个简单的表单,但似乎在 @RequestMapping(value = "/getData", method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
public @ResponseBody
List<String> getMyData(HttpServletRequest request) throws Exception {
System.out.println("In MyDataController"); //not printed in IE when tested without developer tools
//logic here
//return statement
}
类之下有很大的余量。如何在不影响响应性的情况下删除它或者我做错了什么?
.help-block
.user-help {
background: red;
color: white;
text-align: center;
}
答案 0 :(得分:1)
将margin-bottom: 0;
应用于.user-help
并.form-group
指定其父div类。
.form-group .user-help {
background: red;
color: white;
text-align: center;
margin-bottom: 0;
}
.form-horizontal .form-group {
margin-bottom: 0;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class='container'>
<form class='form-horizontal'>
<div class='form-group'>
<input id='fname' type='text' class='form-control' placeholder='First Name'>
<div class='help-block user-help'>First name missing</div>
</div>
<div class='form-group'>
<button type='submit' class='btn btn-primary btn-block'>Sign Up</button>
</div>
</form>
</div>
答案 1 :(得分:0)
.help-block类下面的一大块,有两个原因:
您可以更改或删除第一个.form-group类或.help-block类的margin-bottom值。