直接在emlog后台添加侧边栏然后QQ号和相恋时间修改一下放进去就可以了
<div style="text-align: center;background-color: #e7a3c1"> </br> <div> <img src="http://q1.qlogo.cn/g?b=QQ&nk=你的QQ&s=640" 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;"> <i class="fa fa-heartbeat" style="font-size:30px;color:red"></i> <img src="http://q1.qlogo.cn/g?b=qq&nk=另一半的QQ&s=640" 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;"> </div> </br> <div> <strong>已相恋:</strong><span id="htmer_time" style="color: red;"></span></div> <script type="text/javascript" language="javascript">function setTime() { var create_time = Math.round(new Date(Date.UTC(2018, 06, 08, 6, 45, 0)).getTime() / 1000);//修改这里的时间为你俩在一起的时间 var timestamp = Math.round((new Date().getTime() + 8 * 60 * 60 * 1000) / 1000); currentTime = secondToDate((timestamp - create_time)); currentTimeHtml = currentTime[0] + ' 年 ' + currentTime[1] + ' 天 ' + currentTime[2] + ' 时 ' + currentTime[3] + ' 分 ' + currentTime[4] + ' 秒'; document.getElementById("htmer_time").innerHTML = currentTimeHtml; } function secondToDate(second) { if (!second) { return 0; } var time = new Array(0, 0, 0, 0, 0); if (second >= 365 * 24 * 3600) { time[0] = parseInt(second / (365 * 24 * 3600)); second %= 365 * 24 * 3600; } if (second >= 24 * 3600) { time[1] = parseInt(second / (24 * 3600)); second %= 24 * 3600; } if (second >= 3600) { time[2] = parseInt(second / 3600); second %= 3600; } if (second >= 60) { time[3] = parseInt(second / 60); second %= 60; } if (second > 0) { time[4] = second; } return time; } setInterval(setTime, 1000); </script> </br></div>
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容