• 【Leafletjs】6.Control.Loading推展-在地图上边框添加加载动态条


    在已有的Control.Loading控件基础上结合CSS3 animation属性实现

    .nz-loading .nz-loader
    {
        display: block;
        -webkit-animation: shift-rightwards 3s ease-in-out infinite;
        -moz-animation: shift-rightwards 3s ease-in-out infinite;
        -ms-animation: shift-rightwards 3s ease-in-out infinite;
        -o-animation: shift-rightwards 3s ease-in-out infinite;
        animation: shift-rightwards 3s ease-in-out infinite;
        -webkit-animation-delay: .2s;
        -moz-animation-delay: .2s;
        -o-animation-delay: .2s;
        animation-delay: .2s;
    }
    .nz-loader
    {
        position: absolute;
        display: none;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        z-index: 10100;
        background-color: #79C1C0 !important;
        -webkit-transform: translateX(100%);
        -moz-transform: translateX(100%);
        -o-transform: translateX(100%);
        transform: translateX(100%);
    }
     L.Control.Loading.include({
    
            onAdd: function (map) {
                this._container = L.DomUtil.create('div', 'nz-loader', map._controlContainer);
                map.on('baselayerchange', this._layerAdd, this);
                this._addMapListeners(map);
                this._map = map;
            },
    
            _showIndicator: function () {
                L.DomUtil.addClass(this._map._container, 'nz-loading');
            },
    
            _hideIndicator: function () {
                L.DomUtil.removeClass(this._map._container, 'nz-loading');
            }
    
        });
  • 相关阅读:
    C#遍历DataSet中数据的几种方法总结
    angularjs作用域
    SQL 语句日期用法及函数
    Sublime Text3 快捷键汇总
    AngularJS 最常用的功能
    C#中如何排除/过滤/清空/删除掉字符串数组中的空字符串
    AngularJS的指令用法
    [WCF REST] Web消息主体风格(Message Body Style)
    泛型
    语法补充
  • 原文地址:https://www.cnblogs.com/shitao/p/4905810.html
Copyright © 2020-2023  润新知