• 【装饰】博客园背景轮播


    <script type="text/javascript">
        var img = Math.round(Math.random() * 10);
        var Img = new Array();
        //需要加载的背景图片
        Img[0] = "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3735316392,212988712&fm=200&gp=0.jpg"
        Img[1] = "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=4165415060,2023874983&fm=26&gp=0.jpg"
        Img[2] = "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3706677817,1678627265&fm=26&gp=0.jpg"
        Img[3] = "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=518541639,428272303&fm=26&gp=0.jpg"
        Img[4] = "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1482498295,222129637&fm=26&gp=0.jpg"
        Img[5] = "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=357843698,3560590396&fm=26&gp=0.jpg"
        Img[6] = "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1377601590,3543048053&fm=200&gp=0.jpg"
        Img[7] = "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=4189220961,2869949368&fm=26&gp=0.jpg"
        Img[8] = "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3004924597,1854631352&fm=26&gp=0.jpg"
        Img[9] = "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=299724880,3285215622&fm=26&gp=0.jpg"
        Img[10] = "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2326892196,580815977&fm=26&gp=0.jpg"
        if(document.readyState === "loading" ||document.readyState === "interactive" ||document.readyState === "complete")
        {
            document.body.style.backgroundRepeat = "no-repeat";
            document.body.style.position = "center center" ;
            document.body.style.backgroundAttachment = "fixed";
            document.body.style.backgroundSize = "cover";
            document.body.style.backgroundImage = "URL("+Img[img]+")";
        }
    </script>

  • 相关阅读:
    HTML5基础
    行为类型11-11:状态模式(State Pattern)
    行为类型11-10:中介者模式(MediatorPattern)
    行为类型11-9:责任链模式(Chain of Responsibility Pattern)
    行为类型11-8:模板模式(Template Pattern)
    行为类型11-7:命令模式(Command Pattern)
    行为类型11-6:解释器模式(Interpreter Pattern)
    FTP 连接失败,防火墙端口设置
    Windows下 NodeJs 版本管理 Nvm
    Ubuntu vi 方向键不正常问题
  • 原文地址:https://www.cnblogs.com/sangwl/p/10167675.html
Copyright © 2020-2023  润新知