jquery.transit+css实现圆形三角形正方形上浮动画背景效果代码

代码语言:html

所属分类:背景

代码描述:jquery.transit+css实现圆形三角形正方形上浮动画背景效果代码

代码标签: jquery.transit css 圆形 三角形 正方形 上浮 动画 背景

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!doctype html>
<html>

<head>
    <meta charset="utf-8">

    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script>
    <style>
        body, html {
          background: #007bff;
          height: 100%;overflow: hidden
        }
        
        h1 {
          height: auto;
          display: table;
          width: 80%;
          text-align: center;
          overflow: auto;
          margin: auto;
          position: absolute;
          top: 0;
          left: 0;
          bottom: 0;
          right: 0;
          color: white;
          font-family: "Raleway", sans-serif;
          font-weight: 300;
          font-size: 3em;
        }
    </style>
</head>

<body>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery.transit.min.js"></script>


    <h1>Jquery & CSS3 background</h1>

    <script>
        var background = {}
          
          background.initializr = function (){
            
            var $this = this;
             
        
           
            //option
            $this.id = "background_css3";
            $this.style = {bubbles_color:"#fff",stroke_width:0, stroke_color :"black"};
            $this.bubbles_number = 30;
            $this.speed = [1500,8000]; //milliseconds
            $this.max_bubbles_height = $this.height;
            $this.shape = false // 1 : circle | 2 : triangle | 3 : rect | false :random
            
            if($("#"+$this.id).lenght > 0){
              $("#"+$this.id).remove();
            }
            $this.object = $("<div style='z-inde:-1;margin:0;padding:0; overflow:hidden;position:absolute;bottom:0' id='"+$this.id+"'> </div>'").appendTo("body");
            
            $this.ww = $(window).width()
            $this.wh = $(window).height()
            $this.width = $this.object.width($this.ww);
            $this.height = $this.object.height($this.wh);
            
            
           .........完整代码请登录后点击上方下载按钮下载查看

网友评论0