首页
微语
统计
友链
留言
memos
圈子
图床
推荐
相册
网站监控
VPS监控
Search
1
实现typecho微信时光机功能的图文教程
45,112 阅读
2
为Typecho添加webp解析
43,169 阅读
3
emlog数据成功迁移到typecho
26,691 阅读
4
Memos备忘录,记录瞬间想法
25,614 阅读
5
Jasmine - 简约、美观的博客主题
24,311 阅读
手机达人
免费资源
电脑网络
娱乐休闲
网站建设
威言威语
Typecho
Emlog
WordPress
服务器
主题
插件
排行榜    
登录
/
注册
Search
标签搜索
wordpress
发布
插件
免费
教程
typecho
EMlog
PHP
代码
CSS
华为
图片
代码修改
安装
评论
手机
诺基亚
微信
文章
智能
Chen'mo
累计撰写
1,266
篇文章
累计收到
374
条评论
首页
栏目
手机达人
免费资源
电脑网络
娱乐休闲
网站建设
威言威语
Typecho
Emlog
WordPress
服务器
主题
插件
页面
微语
统计
友链
留言
memos
推荐
相册
网站监控
VPS监控
搜索到
1
篇与
的结果
2021-04-20
给侧边栏添加恋爱计时功能
效果如图示:<section class="joe_aside__item timelife table"> <div class="joe_aside__item-title"> <i class="fa fa-heart-o icon"></i> <span class="text">恋爱清单</span> <span class="line"></span> </div> <div class="content"><br> <div style="text-align: center;"> <img src="https://q1.qlogo.cn/g?b=sdk&k=KeAYc2FhrGZhIXOplOjAXA&s=100" style="width: 50px;height: 50px;vertical-align: -20px;border-radius: 50%;margin-right: 5px;margin-bottom: 5px;-webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.1), 1px 1px 1px rgba(0,0,0,0.1), 1px 1px 1px rgba(0,0,0,0.1);box-shadow: 1px 1px 1px rgba(0,0,0,.1), 1px 1px 1px rgba(0,0,0,0.1), 1px 1px 1px rgba(0,0,0,0.1);border: 2px solid #fff;" title="森"> <a href="//us.arsn.cn/" target="_blank" title="恋爱清单100件"><i class="fa fa-heart us_arsn_cn" style="color:red"></i></a> <img src="https://q1.qlogo.cn/g?b=sdk&k=wUtN0RKG3VZ2NKvuiac8icFA&s=100" style="width: 50px;height: 50px;vertical-align: -20px;border-radius: 50%;margin-left: 5px;margin-bottom: 5px;-webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.1), 1px 1px 1px rgba(0,0,0,0.1), 1px 1px 1px rgba(0,0,0,0.1);box-shadow: 1px 1px 1px rgba(0,0,0,.1), 1px 1px 1px rgba(0,0,0,0.1), 1px 1px 1px rgba(0,0,0,0.1);border: 2px solid #fff;" title="妍"><br> <div class="title">我们已经在一起 <span class="us_arsn_cn_font">520</span>天啦</div> </div> </div><br> </section>另一套源码:<div class="joe_aside__item hot" style="text-align: center; color:#888; font-size: 15px; padding:10px;"> <div style="width: 220px; margin: 0 auto;"> <!-- 左边的头像,nk=后面填写QQ号,直接采集QQ头像 --> <img src="https://q1.qlogo.cn/g?b=qq&nk=209223620&s=640" alt="love" style="width: 60px; border-radius: 50%;"> <!-- 中间的图片 --> <img src="https://cdn.jsdelivr.net/gh/aill66/cdn/love.gif" alt="love" style="width: 60px; border-radius: 50%;"> <!-- 右边的头像,nk=后面填写QQ号,直接采集QQ头像 --> <img src="https://q1.qlogo.cn/g?b=qq&nk=209223620&s=640" alt="love" style="width: 60px; border-radius: 50%;"> </div> <p id="lovepyqSitetime"></p> <script language=javascript> function lovepyqSitetime() { window.setTimeout("lovepyqSitetime()", 1000); var seconds = 1000 var minutes = seconds * 60 var hours = minutes * 60 var days = hours * 24 var years = days * 365 var today = new Date() var todayYear = today.getFullYear() var todayMonth = today.getMonth() + 1 var todayDate = today.getDate() var todayHour = today.getHours() var todayMinute = today.getMinutes() var todaySecond = today.getSeconds() // 时间设置 var t1 = Date.UTC(2019, 10, 19, 22, 22, 00) //年,月,日,时,分,秒 var t2 = Date.UTC(todayYear, todayMonth, todayDate, todayHour, todayMinute, todaySecond) var diff = t2 - t1 var diffYears = Math.floor(diff / years) var diffDays = Math.floor((diff / days) - diffYears * 365) var diffHours = Math.floor((diff - (diffYears * 365 + diffDays) * days) / hours) var diffMinutes = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours) / minutes) var diffSeconds = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours - diffMinutes * minutes) / seconds) document.getElementById("lovepyqSitetime").innerHTML = "我们相恋了:</br>" + diffYears + "年" + diffDays + "天" + diffHours + "时" + diffMinutes + "分" + diffSeconds + "秒啦" } lovepyqSitetime() </script> </div>手机上左侧添加 <!-- 恋爱计时 --> <ul class="joe_header__slideout-count"> <div style="font-size:15px; text-align: center; color:#888;"> <div style="width: 220px; margin: 0 auto;"> <!-- 左边的头像,nk=后面填写QQ号,直接采集QQ头像 --> <img src="https://q1.qlogo.cn/g?b=qq&nk=209223620&s=640" alt="love" style="width: 60px; border-radius: 50%;"> <!-- 中间的图片 --> <img src="https://cdn.jsdelivr.net/gh/aill66/cdn/love.gif" alt="love" style="width: 60px; border-radius: 50%;"> <!-- 右边的头像,nk=后面填写QQ号,直接采集QQ头像 --> <img src="https://q1.qlogo.cn/g?b=qq&nk=209223620&s=640" alt="love" style="width: 60px; border-radius: 50%;"> </div> <p id="loveSitetime"></p> <script language=javascript> function loveSitetime() { window.setTimeout("loveSitetime()", 1000); var seconds = 1000 var minutes = seconds * 60 var hours = minutes * 60 var days = hours * 24 var years = days * 365 var today = new Date() var todayYear = today.getFullYear() var todayMonth = today.getMonth() + 1 var todayDate = today.getDate() var todayHour = today.getHours() var todayMinute = today.getMinutes() var todaySecond = today.getSeconds() // 时间设置 var t1 = Date.UTC(2019, 10, 19, 22, 22, 00) //年,月,日,时,分,秒 var t2 = Date.UTC(todayYear, todayMonth, todayDate, todayHour, todayMinute, todaySecond) var diff = t2 - t1 var diffYears = Math.floor(diff / years) var diffDays = Math.floor((diff / days) - diffYears * 365) var diffHours = Math.floor((diff - (diffYears * 365 + diffDays) * days) / hours) var diffMinutes = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours) / minutes) var diffSeconds = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours - diffMinutes * minutes) / seconds) document.getElementById("loveSitetime").innerHTML = "我们相恋了:</br>" + diffYears + "年" + diffDays + "天" + diffHours + "时" + diffMinutes + "分" + diffSeconds + "秒啦</br>" } loveSitetime() </script> </div> </ul>参考网站:https://www.arsn.cn/https://blog.52aill.xyz/archives/139/
2021年04月20日
4,046 阅读
0 评论
1 点赞