Jquery Autocomplete 建议列表字体很大,我想像输入文本框字体一样小。如何限制建议列表中的小字体?请参阅以下屏幕和代码:
<!DOCTYPE>
<html>
<head>
<title>Auto Complete in JSP Java</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
<STYLE TYPE="text/css" media="all">
.ui-autocomplete {
position: absolute;
cursor: default;
height: 200px;
overflow-y: scroll;
overflow-x: hidden;}
</STYLE>
<script>
$(function() {
$("#names").autocomplete({
source: function(request, response) {
$.ajax({
url: "searchName.jsp",
type: "POST",
dataType: "json",
data: { name: request.term},
success: function( data, textStatus, jqXHR) {
var items = data;
response(items);
},
error: function (error) {
alert('error: ' + error);
}
});
},
minLength: 3
});
});
</script>
</head>
<body>
<input type="text" name="name" id="names" />
</body>
</html>