jquery.ajax-combobox
Version:
jQuery plugin to create a text box which can auto-complete and pull-down-select.
243 lines (214 loc) • 3.57 kB
CSS
@charset "utf-8";
/**
* Container
*/
.ac_container {
border: none;
margin: 0;
padding: 0;
display: inline-block;
vertical-align: text-bottom;
position: relative;
}
.ac_input {
background-color: white;
border-right: none;
border: 1px solid #888;
vertical-align: text-bottom;
display: inline-block;
font-size: 16px;
margin: 0;
padding: 4px;
width: 320px;
height: 32px;
box-sizing: border-box;
}
/**
* "Get all" button
*/
.ac_button {
display: inline-block;
vertical-align: text-bottom;
border: 1px solid #888;
border-left: 0;
cursor: pointer;
position: relative;
text-align: center;
width: 32px;
height: 32px;
box-sizing: border-box;
color: #666;
}
.ac_button > img {
top: 6px;
left: 8px;
height: 16px;
position: absolute;
width: 16px;
}
.ac_btn_out {
background: #ddd;
}
.ac_btn_on {
background: #ccc;
}
.octicon-chevron-down {
display: inline-block;
fill: currentColor;
height: 1.5em;
margin-top: 0.22em;
}
/**
* Results
*/
.ac_result_area {
background-color: transparent;
border: 1px solid #888;
box-shadow: 1px 1px 1px #aaa;
display: none;
list-style: none;
margin: 0;
padding: 0;
position: absolute;
z-index: 100;
}
.ac_results {
background-color: white;
list-style: none;
margin: 0;
padding: 0;
}
.ac_results > li {
color: #000;
font-size: 0.9em;
height: auto ;
line-height: 1;
margin: 0;
overflow: hidden;
line-height: 1.6;
position: relative;
text-align: left;
white-space: nowrap;
}
.ac_selected {
background-color: #def;
font-weight: bold;
}
.ac_over {
background-color: #47c;
color: #fff ;
cursor: pointer;
}
/**
* 選択していないほうの表示を暗くする
*/
.ac_results_off {
background: #eee;
}
.ac_input_off {
background: #eee;
color: #555;
}
.ac_hide {
display: none;
}
/**
* Navi
*/
.ac_navi {
background: #eee;
border-bottom: 1px solid #888;
font-size: 0.8em;
font-weight: normal;
line-height: 1;
margin: 0;
padding: 0.4em 0.3em;
text-align: right;
}
.ac_navi > p > a:link,
.ac_navi > p > a:visited,
.ac_navi > p > a:hover,
.ac_navi > p > a:active {
color: #23c;
font-weight: normal;
margin: 0 0.2em;
text-decoration: underline;
}
.ac_navi > p {
color: black;
font-size: 1.1em;
margin: 0;
padding-top: 0.3em;
text-align: center;
}
.ac_navi > p > a >.current {
color: #00c;
font-size: 1em;
font-weight: bold;
}
.ac_navi > p >.page_end {
color: gray;
font-weight: normal;
margin: 0 0.2em;
}
.navi_page,
.navi_first,
.navi_prev,
.navi_next,
.navi_last {
margin: auto 0.2em ;
}
.ac_navi > .info {
margin: 0 ;
padding: 0 ;
}
/**
* Sub-info
*/
.ac_subinfo {
margin: 0 ;
padding: 0 ;
}
.ac_subinfo > dl {
background: #eee;
border: 1px solid #aaa;
box-shadow: 1px 1px 1px #aaa;
color: #000;
display: none;
margin: 0;
position: absolute;
width: 260px;
z-index: 200;
font-size: 0.85em;
line-height: 1.5;
}
.ac_subinfo > dl > dt {
background: #CEDFF7;
clear: both;
color: #37486A;
float: left;
font-weight: normal;
margin: 0;
padding: 0 0.3em;
text-align: left;
width: 100px;
word-wrap: break-word;
box-sizing: border-box;
}
.ac_subinfo > dl > dt.hide {
display: none ;
}
.ac_subinfo > dl > dd {
float: left;
margin: 0;
padding: 0 0.3em;
width: 160px;
word-wrap: break-word;
box-sizing: border-box;
}
/**
* Select only
*/
.ac_container > .ac_select_ng {
background: #fcc;
}