javascript指上連結彈出提示框效果

來源:互聯網
上載者:User
提示:您可以先修改部分代碼再運行

<!DOCTYPE HTML><html><head><meta charset="utf-8"><title>提示框效果 </title><style>* { padding: 0; margin: 0; }li { list-style: none; }.prompt { width: 710px; height: 301px; background: url(images/bg.gif); margin: 50px auto 0; position: relative; }.prompt ul { position: absolute; top: 241px; }.prompt .list1 { left: 30px; }.prompt .list2 { right: 30px; }.prompt li { float: left; width: 103px; height: 30px; line-height: 30px; text-align: center; margin-right: 1px; background: url(images/li_bg.gif) repeat-x; position: relative; cursor: pointer; }.prompt h2 { color: #fff; font-size: 14px; }.prompt p { width: 128px; height: 100px; padding: 10px; background: url(images/p_bg.gif) no-repeat; filter: alpha(opacity=80); opacity: 0.8; position: absolute; bottom: 28px; left: -24px; display: none; color: #fff; font-size: 12px; text-align: left; line-height: 16px; font-family: arial; }.prompt .active { background: url(images/active.gif) no-repeat; font-weight: bold; }</style><script type="text/javascript">window.onload=function (){var oDiv=document.getElementById('prompt');var aH=oDiv.getElementsByTagName('h2');var aP=oDiv.getElementsByTagName('p');for(var i=0;i<aH.length;i++){aH[i].index=i;aH[i].onmouseover=function (){this.className='active';aP[this.index].style.display='block';};aH[i].onmouseout=function (){this.className='';aP[this.index].style.display='none';};aP[i].onmouseover=function (){this.style.display='block';};aP[i].onmouseout=function (){this.style.display='none';};}}</script></head><body><div id="demo_main"><!-- 這裡放作品 --><div id="prompt" class="prompt"><ul class="list1"><li><h2>產品</h2><p>NX5<br />三星NX平台相機14.6萬像素的APS的- C的感應器工作結構緊湊,重量輕體</p></li><li><h2>經銷商</h2><p>鼎好電子大廈A座9019室<br />聯絡電話:010-62607039 13501246332</p></li><li><h2>價格</h2><p>NX5<br />參考價:890元</p></li></ul><ul class="list2"><li><h2>產品</h2><p>歐達D350<br />500萬像素,最高可插值1200萬像素 高清規格:1080p</p></li><li><h2>經銷商</h2><p>鼎好電子大廈A座9019室<br />聯絡電話:010-62607039 13501246332</p></li><li><h2>價格</h2><p>NX5<br />參考價:1890元</p></li></ul></div></div></body></html></td> </tr></table>
提示:您可以先修改部分代碼再運行

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.