您的位置首页百科知识

jQuery搜索框下拉菜单选择

jQuery搜索框下拉菜单选择

的有关信息介绍如下:

jQuery搜索框下拉菜单选择

jQuery搜索框下拉菜单选择

新建html文档。

准备好需要用到的图标。

书写hmtl代码。

Demo


多选、JSON渲染、分组功能




多选、Option渲染




单选模式,Option渲染




10000 条数据搜索测试


书写css代码。

.popover.top { margin-top: -10px }

.popover.right { margin-left: 10px }

.popover.bottom { margin-top: 10px }

.popover.left { margin-left: -10px }

.popover-title { padding: 8px 14px; margin: 0; font-size: 14px; background-color: #f7f7f7; border-bottom: 1px solid #ebebeb; border-radius: 5px 5px 0 0 }

.popover-content { padding: 9px 14px }

.popover>.arrow, .popover>.arrow:after { position: absolute; display: block; width: 0; height: 0; border-color: transparent; border-style: solid }

.popover>.arrow { border-width: 11px }

.popover>.arrow:after { content: ""; border-width: 10px }

.popover.top>.arrow { bottom: -11px; left: 50%; margin-left: -11px; border-top-color: #999; border-top-color: rgba(0,0,0,.25); border-bottom-width: 0 }

.popover.top>.arrow:after { bottom: 1px; margin-left: -10px; content: " "; border-top-color: #fff; border-bottom-width: 0 }

.popover.right>.arrow { top: 50%; left: -11px; margin-top: -11px; border-right-color: #999; border-right-color: rgba(0,0,0,.25); border-left-width: 0 }

.popover.right>.arrow:after { bottom: -10px; left: 1px; content: " "; border-right-color: #fff; border-left-width: 0 }

.popover.bottom>.arrow { top: -11px; left: 50%; margin-left: -11px; border-top-width: 0; border-bottom-color: #999; border-bottom-color: rgba(0,0,0,.25) }

.popover.bottom>.arrow:after { top: 1px; margin-left: -10px; content: " "; border-top-width: 0; border-bottom-color: #fff }

.popover.left>.arrow { top: 50%; right: -11px; margin-top: -11px; border-right-width: 0; border-left-color: #999; border-left-color: rgba(0,0,0,.25) }

.popover.left>.arrow:after { right: 1px; bottom: -10px; content: " "; border-right-width: 0; border-left-color: #fff }

.carousel { position: relative }

.carousel-inner { position: relative; width: 100%; overflow: hidden }

.carousel-inner>.item { position: relative; display: none; -webkit-transition: .6s ease-in-out left; -o-transition: .6s ease-in-out left; transition: .6s ease-in-out left }

书写并添加js代码。

代码整体结构。

查看效果。