JS 手机浮窗

本文深入探讨了网页布局和交互优化的关键技巧,通过引入CSS样式、JavaScript脚本和特定的网页元素,实现高效、美观且响应式的网页设计。重点介绍了如何使用浮动布局、网格系统和媒体查询来适应不同设备和屏幕尺寸,以及如何通过事件监听和DOM操作来提升用户体验。此外,还分享了几个实用的案例,展示这些技巧在实际项目中的应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
<title></title>
<style>
body,div,p,table,textarea,form,h2,h3,h4,h5,ul,li{margin:0;padding:0;color:#222;font-size:12px}
img{vertical-align:middle;border:0}
body{background:#fff;-webkit-user-select:none;-webkit-text-size-adjust:none}
.left{float:left}
.right{float:right;padding-right:3px}
a{text-decoration:none;color:#222}
</style>
</head>
<body>
<script src="fdSwt.js"></script>
</body>
</html>

 

document.writeln("<style type=\"text/css\">");
document.writeln(".fd-center{ width: 250px; height: 158px; display:none; position: fixed; left:50%;top:50%;margin-left:-125px;margin-top:-79px;z-index: 9999; }");
document.writeln(".fd-bottom{ width: 100%; height: 74px; background: url(/zixun/fd-bottom_bg.gif) repeat-x 0 18px; position: fixed; bottom: 0; left: 0;}");
document.writeln(".fd-bottom img{ display: block; margin: 0 auto;}");
document.writeln("</style>");
document.writeln("<div class=\"fd-center\" id=\"fdCenter\">");
document.writeln("<img src=\"/zixun/fd-center.gif\" width=\"250\" height=\"158\" usemap=\"#centerMap\">");
document.writeln("<map name=\"centerMap\">");
document.writeln("<area shape=\"rect\" coords=\"99,120,166,145\" href=\"/zixun/\" target=\"_blank\" rel=\"nofollow\"></area>");
document.writeln("<area shape=\"rect\" coords=\"170,120,238,145\" href=\"/zixun/\" target=\"_blank\" rel=\"nofollow\"></area>");
document.writeln("<area shape=\"rect\" coords=\"190,0,250,34\" onclick=\"hideCenter();\"></area>");
document.writeln("</map>");
document.writeln("</div>");
document.writeln("<div class=\"fd-bottom\">");
document.writeln("<img src=\"/zixun/fd-bottom.gif\" width=\"280\" height=\"74\" usemap=\"#bottomMap\">");
document.writeln("<map name=\"bottomMap\">");
document.writeln("<area shape=\"rect\" coords=\"0,18,40,74\" href=\"/\"></area>");
document.writeln("<area shape=\"rect\" coords=\"40,18,95,74\" href=\"/zixun/\" target=\"_blank\" rel=\"nofollow\"></area>");
document.writeln("<area shape=\"rect\" coords=\"95,0,188,74\" href=\"tel:xxx\" rel=\"nofollow\" target=\"_blank\"></area>");
document.writeln("<area shape=\"rect\" coords=\"188,18,239,74\" href=\"/zixun/\" target=\"_blank\" rel=\"nofollow\"></area>");
document.writeln("<area shape=\"rect\" coords=\"239,18,280,74\" href=\"/zixun/\" target=\"_blank\" rel=\"nofollow\"></area>");
document.writeln("</map>");
document.writeln("</div>");
function showCenter() {
    if (document.getElementById('fdCenter')) {
        if (document.getElementById('fdCenter').style.display == 'none') {
            document.getElementById('fdCenter').style.display = 'block';
        }
    }
}
function hideCenter() {
    document.getElementById('fdCenter').style.display = "none";
    setInterval(showCenter, 10000);
};
window.onload =  function() {
	document.getElementById('fdCenter').style.display = "none";
	setTimeout(showCenter, 5000);
};
document.write("<script type=\"text/javascript\" src=\"http://lvt.zoosnet.net/JS/LsJS.aspx?siteid=LVT89285571&float=0\"><\/script>");

 

效果图:

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值