本站美化所用的一些样式

我若为王 2019-04-23 PM 1898℃ 4条

说明:

以下部分样式来源于网络,如有侵权请联系我删除
效果预览见本站

自定义js

鼠标点击爱心特效

(function(window,document,undefined){
    var hearts = [];
    window.requestAnimationFrame = (function(){
            return window.requestAnimationFrame ||
                       window.webkitRequestAnimationFrame ||
                       window.mozRequestAnimationFrame ||
                       window.oRequestAnimationFrame ||
                       window.msRequestAnimationFrame ||
                       function (callback){
                               setTimeout(callback,1000/60);
                       }
    })();
    init();
    function init(){
            css(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: absolute;}.heart:after{top: -5px;}.heart:before{left: -5px;}");
            attachEvent();
            gameloop();
    }
    function gameloop(){
            for(var i=0;i<hearts.length;i++){
                if(hearts[i].alpha <=0){
                        document.body.removeChild(hearts[i].el);
                        hearts.splice(i,1);
                        continue;
                }
                hearts[i].y--;
                hearts[i].scale += 0.004;
                hearts[i].alpha -= 0.013;
                hearts[i].el.style.cssText = "left:"+hearts[i].x+"px;top:"+hearts[i].y+"px;opacity:"+hearts[i].alpha+";transform:scale("+hearts[i].scale+","+hearts[i].scale+") rotate(45deg);background:"+hearts[i].color;
        }
        requestAnimationFrame(gameloop);
    }
    function attachEvent(){
            var old = typeof window.onclick==="function" && window.onclick;
            window.onclick = function(event){
                    old && old();
                    createHeart(event);
            }
    }
    function createHeart(event){
        var d = document.createElement("div");
        d.className = "heart";
        hearts.push({
                el : d,
                x : event.clientX - 5,
                y : event.clientY - 5,
                scale : 1,
                alpha : 1,
                color : randomColor()
        });
        document.body.appendChild(d);
}
function css(css){
        var style = document.createElement("style");
            style.type="text/css";
            try{
                style.appendChild(document.createTextNode(css));
            }catch(ex){
                style.styleSheet.cssText = css;
            }
            document.getElementsByTagName('head')[0].appendChild(style);
}
    function randomColor(){
            return "rgb("+(~~(Math.random()*255))+","+(~~(Math.random()*255))+","+(~~(Math.random()*255))+")";
    }})(window,document);

浏览器标签标题修改

var OriginTitile = document.title;
(function () {
    var d;
    document.addEventListener("visibilitychange", function () {
        document.hidden ? (clearTimeout(d), d = setTimeout(function () {
                    document.title = "\u2307\u25cf\ufe4f\u25cf\u2307 Error 404"
                }, 500)) : (document.title = "\u30fe(\u2267\u2207\u2266*)\u309d\u9a97\u4f60\u7684", d = setTimeout(function () {
                    document.title = OriginTitile
                }, 2E3))
    })
})();

文字复制提示(需自行引入layui)

layui.use('layer', function(){
  var layer = layui.layer;
}); 
document.body.oncopy = function() {layer.msg('复制成功,若要转载请务必保留原文链接!', function(){});}; 
标签: init, css

非特殊说明,本博所有文章均为博主原创。

评论啦~



已有 4 条评论


  1. Eric Jones
    Eric Jones

    Hello, my name’s Eric and I just ran across your website at ifking.cn...

    I found it after a quick search, so your SEO’s working out…

    Content looks pretty good…

    One thing’s missing though…

    A QUICK, EASY way to connect with you NOW.

    Because studies show that a web lead like me will only hang out a few seconds – 7 out of 10 disappear almost instantly, Surf Surf Surf… then gone forever.

    I have the solution:

    Talk With Web Visitor is a software widget that’s works on your site, ready to capture any visitor’s Name, Email address and Phone Number. You’ll know immediately they’re interested and you can call them directly to TALK with them - literally while they’re still on the web looking at your site.

    CLICK HERE https://jumboleadmagnet.com to try out a Live Demo with Talk With Web Visitor now to see exactly how it works and even give it a try… it could be huge for your business.

    Plus, now that you’ve got that phone number, with our new SMS Text With Lead feature, you can automatically start a text (SMS) conversation pronto… which is so powerful, because connecting with someone within the first 5 minutes is 100 times more effective than waiting 30 minutes or more later.

    The new text messaging feature lets you follow up regularly with new offers, content links, even just follow up notes to build a relationship.

    Everything I’ve just described is extremely simple to implement, cost-effective, and profitable.

    CLICK HERE https://jumboleadmagnet.com to discover what Talk With Web Visitor can do for your business, potentially converting up to 100X more eyeballs into leads today!

    Eric
    PS: Talk With Web Visitor offers a FREE 14 days trial – and it even includes International Long Distance Calling.
    You have customers waiting to talk with you right now… don’t keep them waiting.
    CLICK HERE https://jumboleadmagnet.com to try Talk With Web Visitor now.

    If you'd like to unsubscribe click here http://jumboleadmagnet.com/unsubscribe.aspx?d=ifking.cn

    回复 2022-01-18 18:17
  2. Eric Jones
    Eric Jones

    My name’s Eric and I just came across your website - ifking.cn - in the search results.

    Here’s what that means to me…

    Your SEO’s working.

    You’re getting eyeballs – mine at least.

    Your content’s pretty good, wouldn’t change a thing.

    BUT…

    Eyeballs don’t pay the bills.

    CUSTOMERS do.

    And studies show that 7 out of 10 visitors to a site like ifking.cn will drop by, take a gander, and then head for the hills without doing anything else.

    It’s like they never were even there.

    You can fix this.

    You can make it super-simple for them to raise their hand, say, “okay, let’s talk” without requiring them to even pull their cell phone from their pocket… thanks to Talk With Web Visitor.

    Talk With Web Visitor is a software widget that sits on your site, ready and waiting to capture any visitor’s Name, Email address and Phone Number. It lets you know immediately – so you can talk to that lead immediately… without delay… BEFORE they head for those hills.

    CLICK HERE https://jumboleadmagnet.com to try out a Live Demo with Talk With Web Visitor now to see exactly how it works.

    Now it’s also true that when reaching out to hot leads, you MUST act fast – the difference between contacting someone within 5 minutes versus 30 minutes later is huge – like 100 times better!

    That’s what makes our new SMS Text With Lead feature so powerful… you’ve got their phone number, so now you can start a text message (SMS) conversation with them… so even if they don’t take you up on your offer right away, you continue to text them new offers, new content, and new reasons to do business with you.

    This could change everything for you and your business.

    CLICK HERE https://jumboleadmagnet.com to learn more about everything Talk With Web Visitor can do and start turing eyeballs into money.

    Eric
    PS: Talk With Web Visitor offers a FREE 14 days trial – you could be converting up to 100x more leads immediately!
    It even includes International Long Distance Calling.
    Paying customers are out there waiting.
    Starting connecting today by CLICKING HERE https://jumboleadmagnet.com to try Talk With Web Visitor now.

    If you'd like to unsubscribe click here http://jumboleadmagnet.com/unsubscribe.aspx?d=ifking.cn

    回复 2022-01-15 19:11
  3. Eric Jones
    Eric Jones

    Hi, my name is Eric and I’m betting you’d like your website ifking.cn to generate more leads.

    Here’s how:
    Talk With Web Visitor is a software widget that’s works on your site, ready to capture any visitor’s Name, Email address and Phone Number. It signals you as soon as they say they’re interested – so that you can talk to that lead while they’re still there at ifking.cn.

    Talk With Web Visitor – CLICK HERE http://jumboleadmagnet.com for a live demo now.

    And now that you’ve got their phone number, our new SMS Text With Lead feature enables you to start a text (SMS) conversation – answer questions, provide more info, and close a deal that way.

    If they don’t take you up on your offer then, just follow up with text messages for new offers, content links, even just “how you doing?” notes to build a relationship.

    CLICK HERE http://jumboleadmagnet.com to discover what Talk With Web Visitor can do for your business.

    The difference between contacting someone within 5 minutes versus a half-hour means you could be converting up to 100X more leads today!

    Try Talk With Web Visitor and get more leads now.

    Eric
    PS: The studies show 7 out of 10 visitors don’t hang around – you can’t afford to lose them!
    Talk With Web Visitor offers a FREE 14 days trial – and it even includes International Long Distance Calling.
    You have customers waiting to talk with you right now… don’t keep them waiting.
    CLICK HERE http://jumboleadmagnet.com to try Talk With Web Visitor now.

    If you'd like to unsubscribe click here http://jumboleadmagnet.com/unsubscribe.aspx?d=ifking.cn

    回复 2022-01-15 01:51
  4. Eric Jones
    Eric Jones

    My name’s Eric and I just came across your website - ifking.cn - in the search results.

    Here’s what that means to me…

    Your SEO’s working.

    You’re getting eyeballs – mine at least.

    Your content’s pretty good, wouldn’t change a thing.

    BUT…

    Eyeballs don’t pay the bills.

    CUSTOMERS do.

    And studies show that 7 out of 10 visitors to a site like ifking.cn will drop by, take a gander, and then head for the hills without doing anything else.

    It’s like they never were even there.

    You can fix this.

    You can make it super-simple for them to raise their hand, say, “okay, let’s talk” without requiring them to even pull their cell phone from their pocket… thanks to Talk With Web Visitor.

    Talk With Web Visitor is a software widget that sits on your site, ready and waiting to capture any visitor’s Name, Email address and Phone Number. It lets you know immediately – so you can talk to that lead immediately… without delay… BEFORE they head for those hills.

    CLICK HERE https://jumboleadmagnet.com to try out a Live Demo with Talk With Web Visitor now to see exactly how it works.

    Now it’s also true that when reaching out to hot leads, you MUST act fast – the difference between contacting someone within 5 minutes versus 30 minutes later is huge – like 100 times better!

    That’s what makes our new SMS Text With Lead feature so powerful… you’ve got their phone number, so now you can start a text message (SMS) conversation with them… so even if they don’t take you up on your offer right away, you continue to text them new offers, new content, and new reasons to do business with you.

    This could change everything for you and your business.

    CLICK HERE https://jumboleadmagnet.com to learn more about everything Talk With Web Visitor can do and start turing eyeballs into money.

    Eric
    PS: Talk With Web Visitor offers a FREE 14 days trial – you could be converting up to 100x more leads immediately!
    It even includes International Long Distance Calling.
    Paying customers are out there waiting.
    Starting connecting today by CLICKING HERE https://jumboleadmagnet.com to try Talk With Web Visitor now.

    If you'd like to unsubscribe click here http://jumboleadmagnet.com/unsubscribe.aspx?d=ifking.cn

    回复 2022-01-09 02:50
鲁ICP备14003065号-4