找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 5962|回复: 0

电脑端弹窗风格欣赏

[复制链接]

60

主题

7

回帖

2万

积分

管理员

积分
25607
发表于 2020-3-28 16:23:34 | 显示全部楼层 |阅读模式
弹窗广告风格欣赏,代码如下

  1. <div style="height: 465px;width: 500px;background: url(https://www.diskao.com/static/temp/chun.png) center no-repeat;background-size:cover;position: relative;">
  2.     <div style="position: absolute;left:0;top:59%;width:100%;text-align: center;">
  3.         <p style="font-size: 20px;font-weight: bold;color: #00effd;">活动倒计时</p>
  4.         <div style="font-size: 16px;padding-top: 20px;color: #ffcb00;">
  5.             <span id="popadv_settimer_1" style="color:#fff;margin:0 4px;font-size:18px;padding:3px 5px;border-radius:5px;background:#6a66e8;border:#00effd solid 2px;">00</span>天
  6.             <span id="popadv_settimer_2" style="color:#fff;margin:0 4px;font-size:18px;padding:3px 5px;border-radius:5px;background:#6a66e8;border:#00effd solid 2px;">00</span>时
  7.             <span id="popadv_settimer_3" style="color:#fff;margin:0 4px;font-size:18px;padding:3px 5px;border-radius:5px;background:#6a66e8;border:#00effd solid 2px;">00</span>分
  8.             <span id="popadv_settimer_4" style="color:#fff;margin:0 4px;font-size:18px;padding:3px 5px;border-radius:5px;background:#6a66e8;border:#00effd solid 2px;">00</span>秒
  9.         </div>
  10.     </div>
  11.     <div style="position: absolute;left:0;bottom:4.6%;width:100%;text-align: center;">
  12.     <a href="https://addon.dismall.com/?@popadv.plugin" style="display: block;font-size: 24px;line-height:24px;color: #3e1627;font-weight: bold;text-align: center;">立即抢购</a>
  13.     </div>
  14. </div>
  15. <script type="text/javascript">
  16. var popadv_date1 = new Date();
  17. var popadv_date2 = new Date('2028/12/31 00:00:00');
  18. popadv_settimer((popadv_date2.getTime() - popadv_date1.getTime())/1000);
  19. function popadv_settimer(time){
  20.     if(time > 0){
  21.         var timer_day = Math.floor(time / 86400);
  22.         var timer_hour = Math.floor((time % 86400) / 3600);
  23.         var timer_minute = Math.floor(((time % 86400) % 3600) / 60);
  24.         var timer_second = Math.floor(((time % 86400) % 3600) % 60);
  25.         document.getElementById("popadv_settimer_1").innerHTML = timer_day < 10 ? '0' + timer_day : timer_day;
  26.         document.getElementById("popadv_settimer_2").innerHTML = timer_hour < 10 ? '0' + timer_hour : timer_hour;
  27.         document.getElementById("popadv_settimer_3").innerHTML = timer_minute < 10 ? '0' + timer_minute : timer_minute;
  28.         document.getElementById("popadv_settimer_4").innerHTML = timer_second < 10 ? '0' + timer_second : timer_second;
  29.         time--;
  30.         setTimeout(function () { popadv_settimer(time); }, 1000);
  31.     }else{

  32.     }
  33. }
  34. </script>
复制代码



chun.png
https://addon.dismall.com/developer-19874.html
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|diskao ( 浙ICP备88888888号 )

GMT+8, 2026-3-2 15:10 , Processed in 0.233794 second(s), 39 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表