hierarchy-select实现可搜索的下拉选择框效果代码
代码语言:html
所属分类:表单美化
代码描述:hierarchy-select实现可搜索的下拉选择框效果代码
代码标签: hierarchy-select 搜索 下拉 选择框
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.4.3.1.min.css"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/hierarchy-select.min.css"> </head> <body> <main> <center style="margin-top: 50px"> <h3> Example 1</h3> <div class="dropdown hierarchy-select" id="example"> <button type="button" class="btn btn-secondary dropdown-toggle" id="example-two-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button> <div class="dropdown-menu" aria-labelledby="example-two-button"> <div class="hs-searchbox"> <input type="text" class="form-control" autocomplete="off"> </div> <div class="hs-menu-inner"> <a class="dropdown-item" data-value="" data-default-selected="" href="#">All colors</a> <a class="dropdown-item" data-value="1" href="#">Red</a> <a class="dropdown-item" data-value="2" href="#">Orange</a> <a class="dropdown-item" data-value="3" href="#">Yellow</a> <a class="dropdown-item" data-value="4" href="#">Green</a> <a class="dropdown-item" data-value="5" href="#">Blue</a> <a class="dropdown-item" data-value="6" href="#">Purple</a> <a class="dropdown-item" data-value="7" href="#">Pink</a> <a class="dropdown-item" data-value="8" href="#">Brown</a> <a class="dropdown-item" data-value="9" href="#">Black</a> <a class="dropdown-item" data-value="10" href="#">Grey</a> <a class="dropdown-item" data-value="11" href="#">White</a> </div> </div> <input class="d-none" name="example_two" readonly="readonly" aria-hidden="true" type="text" /> </div> <br> <br> <h3> Example 2</h3> <div class="dropdown hierarchy-select" id="example-one"> <button type="button" class="btn btn-secondary dropdown-toggle" id="example-one-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button> <div class="dropdown-menu" aria-labelledby="example-one-button"> <div class="hs-searchbox"> <input type="text" class="form-control" autocomplete="off"> </div> <div class="hs-menu-inner"> <a class="dropdown-item" data-value="" data-level="1" data-default-selected="" href="#">All categories</a> <a class="dropdown-item" data-value="1" data-level=".........完整代码请登录后点击上方下载按钮下载查看
网友评论0