Is there any non-select drop-down selection? _html/css_WEB-ITnose
有没有非select 的下拉选择? 就等于是一个下拉式的滑动门。找了好多,无一例外都是select 的模拟器的等。
不需要模拟的那么麻烦,就是一个下拉,然后被选择的项目出现在第一,后面切换一个滑动。
哎,这玩意真不好描述。
回复讨论(解决方案)
实在不好描述,上个图吧。
有人有么?非常感谢啊!
这个一般都是js配合css完成的,你搜一下下拉菜单插件
怎么说呢。。。。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>statistics test</title> <script src="http://www.w3school.com.cn/jquery/jquery-1.11.1.min.js"></script> <style type="text/css"> .dropdiv{ width: 180px; height: 24px; overflow: hidden; float: left; font-size: 13px; font-family: "微软雅黑"; position: relative; padding: 0px 26px 0px 5px; border: solid 1px #cecece; background: url(../images/droparrow.png) 186px no-repeat; } .dropmiandiv{ margin-left: 40px; width: 213px; background: url(../images/dropdown.png) repeat-x; height: 27px; } .chooseItems{ border: solid 1px #cecece; } .chooseItems .chooseItem{ font-size: 13px; font-family: "微软雅黑"; padding: 5px; border-bottom: solid 1px #cecece; } .chooseItems .chooseItem:last-child{ border-bottom:none; } .chooseItems .chooseItem:hover{ background: #f2f2f2; } </style> </head> <body> <div class="dropmiandiv" quest ="select1"> <input type="text" readonly="readonly" id ="select1" displayMember="-1" valueMember ="请选择" class="dropdiv" value="请选择"/> </div> <div class="chooseItems" answer ="select1" style="display:none; position:absolute;"> <div class="chooseItem" displayMember="0" valueMember ="独立注册译员">独立注册译员</div> <div class="chooseItem" displayMember="1" valueMember ="供应商译员">供应商译员</div> <div class="chooseItem" displayMember="2" valueMember ="供应商">供应商</div> <div class="chooseItem" displayMember="3" valueMember ="代理商">代理商</div> </div> <div class="dropmiandiv" quest ="select2" style="position:absolute;top:200px;"> <input type="text" readonly="readonly" id ="select2" displayMember="-1" valueMember ="请选择" class="dropdiv" value="请选择"/> </div> <div class="chooseItems" answer ="select2" style="display:none; position:absolute;"> <div class="chooseItem" displayMember="0" valueMember ="独立注册译员">独立注册译员</div> <div class="chooseItem" displayMember="1" valueMember ="供应商译员">供应商译员</div> <div class="chooseItem" displayMember="2" valueMember ="供应商">供应商</div> <div class="chooseItem" displayMember="3" valueMember ="代理商">代理商</div> </div> </body> </html> <script type="text/javascript"> $(".dropdiv").click(function(e){ $(".chooseItems").slideUp(300); e.stopPropagation(); var quest = $(this).parent(); var questwidth = parseInt(quest.width())-2; var questheight = quest.height(); var left = quest.position().left+parseInt(quest.css("margin-left"))+parseInt(quest.css("padding-left")); var top = parseInt(quest.position().top)+parseInt(questheight)+4; var attrs = quest.attr("quest"); var selectsd = $('.chooseItems[answer='+attrs+']'); var selectsdHeight = selectsd.height(); if((top+selectsdHeight)>$(window).height()){ top = top - selectsdHeight - questheight-7; } if($(selectsd).is(":visible")){ $(selectsd).slideUp(300); }else{ $(selectsd).css({"left":left+"px","top":top+"px","width":questwidth+"px"}).slideDown(300); } }); $(".chooseItem").click(function(e){ e.stopPropagation(); var divhtml = $(this); var displayMember,valueMember; displayMember = divhtml.attr("displayMember"); valueMember = divhtml.attr("valueMember"); var attrs =$(this).parent().attr("answer"); var parent = $("#"+attrs); var olddisplayMember,oldvalueMember; olddisplayMember = parent.attr("displayMember"); oldvalueMember = parent.attr("valueMember"); if(olddisplayMember !=displayMember){ parent.attr("displayMember",displayMember); parent.attr("valueMember",valueMember); parent.val(valueMember); parent.change(); } $(this).parent().slideUp(300); }); $(document).click(function(e){ var target = $(e.target); if(target.closest(".chooseItems").length == 0){ $(".chooseItems").slideUp(300); } }); </script>
;script src="http://bootstrap.ninghao.net/assets/js/bootstrap-tab.js">
This is the effect, but this code is too much. Simple JQ implementation, does any master have a favorite?
="#dropdown2" data-toggle="tab">American drama
The effect of these two items
The above effect is that there is too much JS Now, it would be nice if the three JS can be separated. The effect is the one I posted. Pull down to switch the TAB box behind

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

HTML, CSS and JavaScript are the core technologies for building modern web pages: 1. HTML defines the web page structure, 2. CSS is responsible for the appearance of the web page, 3. JavaScript provides web page dynamics and interactivity, and they work together to create a website with a good user experience.

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.
