Css imitation select drop-down list

Source: Internet
Author: User
Tip: you can modify some code before running

<p><meta content="EditPlus" name="Generator" /><meta content="" name="Author" /><meta content="" name="Keywords" /><meta content="" name="Description" /><style type="text/css">/* Basic */* {padding: 0; margin: 0; color: #000; font: 12px/20px Arial, Sans-serif, "";} /* elements */. clear {clear: both; height: 0px; overflow: hidden;} ul, li, ol {list-style-type: none; list-style-position: outside ;} button ,. btnNormal {height: 22px; line-height: 18px; padding: 0 9px! Important; padding: 0 5px;} a {color: # 0042ff; text-decoration: underline;} a, a * {cursor: pointer;} a img {border: 0 ;}. searchTool {float: left; width: 520px ;}. searchTool. searchExtend {float: left; line-height: 24px; _ padding-top: 5px ;}. searchTool. radio {vertical-align: middle; margin-left: 10px; margin-right: 2px; * margin-right: 0 ;}. searchTool. txtSearch {float: left; width: 232px; padding: 2px 2px 0 2px; height: 20px; line-height: 20px; vertical-align: bottom; border: 1px solid #3e99d4 ;}. searchTool. selSearch {float: left; width: 60px; background: # fff; height: 22px; line-height: 22px; border: 1px solid #3e99d4; border-left: 0 ;}. searchTool. nowSearch {float: left; width: 40px; height: 20px; line-height: 22px; overflow: hidden; padding-left: 4px ;}. searchTool. btnSel {float: right; border-left: 1px solid #3e99d4; width: 14px; height: 22px ;}. searchTool. btnSel a {background: url (yun_qi_img/btn_sel.gif) no-repeat center; display: block; width: 14px; height: 22px ;}. searchTool. btnSel a: hover {background: url (yun_qi_img/btn_sel_over.gif) no-repeat center; border: 1px solid # fff; width: 12px; height: 20px ;}. searchTool. selOption {z-index: 9999; position: absolute; margin-left:-1px; width: 60px; background: # fff; border: 1px solid #3e99d4 ;}. searchTool. selOption a {display: block; height: 21px; padding-left: 5px; line-height: 21px; color: #000; text-decoration: none ;}. searchTool. selOption a: hover {color: # fff; background: #95d5f1 ;}. searchTool. btnSearch {float: left; margin-left: 10px; width: 58px; height: 22px; line-height: 22px; border: 1px solid #3e99d4; overflow: hidden ;}. searchTool. btnSearch a {background: url (yun_qi_img/bg_nav_option.gif) repeat-x center-6px; display: block; text-decoration: none; height: 22px; line-height: 22px; overflow: hidden ;}. searchTool. btnSearch a: hover {background: url (yun_qi_img/bg_nav_option_over.gif) repeat-x center; border: 1px solid # fff; height: 20px; line-height: 20px ;}. searchTool. btnSearch. lbl {cursor: pointer; display: block; width: 40px; padding-left: 5px; letter-spacing: 5px; text-align: center; height: 18px; padding-top: 1px; margin: 0 auto; filter: progid: DXImageTransform. microsoft. dropShadow (color = # daeefa, offX = 1, offY = 1, positives = true );}. searchTool. btnSearch a: hover. lbl {padding-top: 0px ;}</style></p><script>function drop_mouseover(pos){try{window.clearTimeout(timer);}catch(e){}}function drop_mouseout(pos){var posSel=document.getElementById(pos+"Sel").style.display;if(posSel=="block"){timer = setTimeout("drop_hide('"+pos+"')", 1000);}}function drop_hide(pos){document.getElementById(pos+"Sel").style.display="none";}function search_show(pos,searchType,href){ document.getElementById(pos+"SearchType").value=searchType; document.getElementById(pos+"Sel").style.display="none"; document.getElementById(pos+"Slected").innerHTML=href.innerHTML; document.getElementById(pos+'q').focus(); var sE = document.getElementById("searchExtend"); if(sE != undefined && searchType == "bar"){ sE.style.display="block"; }else if(sE != undefined){ sE.style.display="none"; }try{window.clearTimeout(timer);}catch(e){}return false;}</script><div class="searchTool"><form id="headSearchForm" action="http://so.youku.com/search_playlist" method="get" onsubmit="return dosearch(this);" name="headSearchForm"> <input class="txtSearch" id="headq" name="q" value="闯关东" type="text" /> <input type="hidden" name="searchdomain" value="http://so.youku.com" /> <input id="headSearchType" type="hidden" name="searchType" value="playlist" /> <div class="selSearch"> <div class="nowSearch" id="headSlected" onmouseout="drop_mouseout('head');" onclick="if(document.getElementById('headSel').style.display=='none'){document.getElementById('headSel').style.display='block';}else {document.getElementById('headSel').style.display='none';};return false;">Album</div> <div class="btnSel"> </div> <div class="clear"> </div> <ul class="selOption" id="headSel" > <li>Video</li> <li>Album</li> <li>Member</li> <li>See</li> <li>Primary key servers</li> </ul> </div> <div class="btnSearch">Search</div> <div class="searchExtend" id="searchExtend" name="searchExtend"><input class="radio" type="radio" onclick="csbt(this,this.form.sbts);" name="sbt" value="post" />Search for posts<input class="radio" type="radio" onclick="csbt(this,this.form.sbts);" name="sbt" value="user" />Search by author<input type="hidden" name="sbts" value="bar" /></div> <div class="clear"> </div></form></div><div class="clear"> </div><div> </div><div> </div>
Tip: you can modify some code before running
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.