国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

JS實現簡單易用的手機端浮動窗口顯示效果

2019-11-20 09:03:22
字體:
來源:轉載
供稿:網友

本文實例講述了JS實現簡單易用的手機端浮動窗口顯示效果。分享給大家供大家參考,具體如下:

html:

<style type="text/css">.fdBonTel{ width:100%; height:53px; position:fixed; background:#0052ae; text-align:center; left:0; bottom:0; z-index:999; }.fdOnline{ background:url(index/images/online.png) no-repeat; width:255px; height:181px; position:fixed; left:50%; margin-left:-128px; top:40%; z-index:999; border-radius: 15px; box-shadow: 0 0 20px rgba(10, 2, 4, 0.75);}.fdOnline .fdOClose{ width:44px; height:44px; display:block; margin-top:-17px; margin-right:-6px;}.fdOnline .fdOTel{ background:#CF3; width:127px; height:58px; display:block; margin-top:123px;}.fdOnline .fdOOn{ background:#036; width:128px; height:58px; display:block; margin-top:96px;}</style><div class="fdBonTel">  <img src="index/images/fdTel.gif" usemap="#Maps">  <map name="Maps" id="Maps">    <area shape="rect" coords="2,2,79,52" onClick="openZoosUrl();">      <area shape="rect" coords="77,2,166,52" href="tel:0855-8253310">      <area shape="rect" coords="166,4,242,51" onClick="openZoosUrl();">    <area shape="rect" coords="248,5,318,53" onClick="openZoosUrl();">  </map></div><div class="fdOnline" id="fdOnline">  <a href="###" class="fdOClose f_r" onclick="closeOnline();"><img src="index/images/closeBtn.png" width="44" height="44"></a>  <a href="###" class="fdOTel f_l"></a>  <a href="###" class="fdOOn f_r"></a></div>

js:

// JavaScript Documentdocument.writeln("<style type=/"text/css/">");document.writeln(".fdBonTel{ width:100%; height:53px; position:fixed; background:#0052ae; text-align:center; left:0; bottom:0; z-index:999; }");document.writeln(".fdOnline{ background:url(index/images/online.png) no-repeat; width:255px; height:181px; position:fixed; left:50%; margin-left:-128px; top:40%; z-index:999; border-radius: 15px; box-shadow: 0 0 20px rgba(10, 2, 4, 0.75);}");document.writeln(".fdOnline .fdOClose{ width:44px; height:44px; display:block; margin-top:-17px; margin-right:-6px;}");document.writeln(".fdOnline .fdOTel{ width:127px; height:58px; display:block; margin-top:123px;}");document.writeln(".fdOnline .fdOOn{ width:128px; height:58px; display:block; margin-top:96px;}");document.writeln("</style>");document.writeln("<div class=/"fdBonTel/">");document.writeln(" <img src=/"index/images/fdTel.gif/" usemap=/"#Maps/">");document.writeln(" <map name=/"Maps/" id=/"Maps/">");document.writeln("   <area shape=/"rect/" coords=/"2,2,79,52/" onClick=/"openZoosUrl();/">");document.writeln("     <area shape=/"rect/" coords=/"77,2,166,52/" href=/"tel:0855-8253310/">");document.writeln("     <area shape=/"rect/" coords=/"166,4,242,51/" onClick=/"openZoosUrl();/">");document.writeln("   <area shape=/"rect/" coords=/"248,5,318,53/" onClick=/"openZoosUrl();/">");document.writeln(" </map>");document.writeln("</div>");document.writeln("<div class=/"fdOnline/" id=/"fdOnline/">");document.writeln(" <a href=/"###/" class=/"fdOClose f_r/" onclick=/"closeOnline();/"><img src=/"index/images/closeBtn.png/" width=/"44/" height=/"44/"></a>");document.writeln(" <a href=/"###/" class=/"fdOTel f_l/"></a>");document.writeln("  <a href=/"###/" class=/"fdOOn f_r/"></a>");document.writeln("</div>");function showOnline() {  if (document.getElementById("fdOnline")) {    if (document.getElementById("fdOnline").style.display == "none") {      document.getElementById("fdOnline").style.display = "block";    }  }}function closeOnline() {  document.getElementById("fdOnline").style.display = "none";  setInterval(chkSWT, 30000);};$(function(){  setInterval(showOnline, 30000);});

效果圖:

更多關于JavaScript相關內容感興趣的讀者可查看本站專題:《JavaScript遍歷算法與技巧總結》、《JavaScript切換特效與技巧總結》、《JavaScript查找算法技巧總結》、《JavaScript動畫特效與技巧匯總》、《JavaScript錯誤與調試技巧總結》、《JavaScript數據結構與算法技巧總結》及《JavaScript數學運算用法總結

希望本文所述對大家JavaScript程序設計有所幫助。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 缙云县| 蓝田县| 惠来县| 金川县| 通化县| 乌什县| 全椒县| 开封县| 镇康县| 内黄县| 桐梓县| 巴彦县| 平安县| 云和县| 锡林浩特市| 建湖县| 乐陵市| 林西县| 临潭县| 涪陵区| 乐平市| 隆化县| 铅山县| 南岸区| 铜陵市| 山丹县| 定兴县| 娱乐| 普兰店市| 丘北县| 桑植县| 久治县| 慈溪市| 慈利县| 鄂托克旗| 邢台市| 即墨市| 柘城县| 马龙县| 房产| 抚远县|