css+js實現select列表橫向排列效果代碼_表單特效

來源:互聯網
上載者:User
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>請選擇ABCDEFGHI_select橫排效果_雲棲社區</title> </head> <body> <style> *{font-size:12px;} A.s_l { BORDER: #dddddd 1px solid;BORDER-right: #dddddd 0px solid; BACKGROUND: #ffffff;PADDING: 4px 6px 2px 6px; TEXT-DECORATION: none;line-height:12px } A.s_l:hover { BORDER: #003366 1px solid;BORDER-right: #dddddd 0px solid; BACKGROUND: #0063dc;COLOR: #ffffff; TEXT-DECORATION: none;line-height:12px } A.s_r { BORDER: #dddddd 1px solid;BACKGROUND: #ffffff; PADDING: 4px 6px 2px 6px; TEXT-DECORATION: none;line-height:12px } A.s_r:hover { BORDER: #003366 1px solid;BACKGROUND: #0063dc;COLOR: #ffffff; TEXT-DECORATION: none;line-height:12px } input {BORDER: #aaa 1px solid;width:65px;height:23px;PADDING: 4px 6px 0px 6px;background:url(http://bbs.blueidea.com/attachment.php?aid=90338&noupdate=yes) no-repeat 95% center;} .span1 {position:relative;top:3px;} .span2 {position:relative;left:-3px;top:1px} </style> <span class="span1"><input type="text" value="請選擇" onclick="sele(this)"></span> <span class="span2" id="select" >ABCDEFGHI</span> <script> function sele(o){ var oobj=document.getElementById("select") if (oobj.style.display=="none"){ oobj.style.display="" var obj=oobj.getElementsByTagName("a"),j=obj.length for (var i=0;i<j;i++){ obj[i].onclick=function(){ o.value=this.innerHTML; oobj.style.display="none" } } } else oobj.style.display="none" } </script> </body> </html>
[Ctrl+A 全選 注:如需引入外部Js需重新整理才能執行]

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.