pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    <small id='Kd0oq'></small><noframes id='Kd0oq'>

      <bdo id='Kd0oq'></bdo><ul id='Kd0oq'></ul>
    <legend id='Kd0oq'><style id='Kd0oq'><dir id='Kd0oq'><q id='Kd0oq'></q></dir></style></legend>
    1. <tfoot id='Kd0oq'></tfoot>

    2. <i id='Kd0oq'><tr id='Kd0oq'><dt id='Kd0oq'><q id='Kd0oq'><span id='Kd0oq'><b id='Kd0oq'><form id='Kd0oq'><ins id='Kd0oq'></ins><ul id='Kd0oq'></ul><sub id='Kd0oq'></sub></form><legend id='Kd0oq'></legend><bdo id='Kd0oq'><pre id='Kd0oq'><center id='Kd0oq'></center></pre></bdo></b><th id='Kd0oq'></th></span></q></dt></tr></i><div class="z5rdrd5" id='Kd0oq'><tfoot id='Kd0oq'></tfoot><dl id='Kd0oq'><fieldset id='Kd0oq'></fieldset></dl></div>

        傳單Js自定義控制按鈕添加(文字,懸停)

        leaflet Js custom control button add (text, hover)(傳單Js自定義控制按鈕添加(文字,懸停))

            <i id='VWaPy'><tr id='VWaPy'><dt id='VWaPy'><q id='VWaPy'><span id='VWaPy'><b id='VWaPy'><form id='VWaPy'><ins id='VWaPy'></ins><ul id='VWaPy'></ul><sub id='VWaPy'></sub></form><legend id='VWaPy'></legend><bdo id='VWaPy'><pre id='VWaPy'><center id='VWaPy'></center></pre></bdo></b><th id='VWaPy'></th></span></q></dt></tr></i><div class="vj5fjvl" id='VWaPy'><tfoot id='VWaPy'></tfoot><dl id='VWaPy'><fieldset id='VWaPy'></fieldset></dl></div>
              <bdo id='VWaPy'></bdo><ul id='VWaPy'></ul>
            • <small id='VWaPy'></small><noframes id='VWaPy'>

            • <tfoot id='VWaPy'></tfoot>

                    <tbody id='VWaPy'></tbody>

                  <legend id='VWaPy'><style id='VWaPy'><dir id='VWaPy'><q id='VWaPy'></q></dir></style></legend>
                  本文介紹了傳單Js自定義控制按鈕添加(文字,懸停)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我遵循了 這個 control-button-leaflet 教程,它對我有用.現在我想:

                  1. 當我將鼠標懸停在按鈕上時顯示一些文本(例如使用縮放按鈕)
                  2. 當我將鼠標懸停在按鈕上時更改按鈕的顏色
                  3. 能夠在按鈕內寫入文本而不是圖像.

                  代碼如下:

                   var customControl = L.Control.extend({選項: {位置:左上角"},onAdd:函數(地圖){var container = L.DomUtil.create('div', 'leaflet-bar Leaflet-control Leaflet-control-custom');container.style.backgroundColor = '白色';container.style.backgroundImage = "url(http://t1.gstatic.com/images?q=tbn:ANd9GcR6FCUMW5bPn8C4PbKak2BJQQsmC-K9-mbYBeFZm1ZM2w2GRy40Ew)";container.style.backgroundSize = "30px 30px";container.style.width = '30px';container.style.height = '30px';container.onclick = 函數(){console.log('buttonClicked');}返回容器;}});變量映射;var readyState = 函數(e){map = new L.Map('map').setView([48.935, 18.14], 14);L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);map.addControl(new customControl());}window.addEventListener('DOMContentLoaded', readyState);

                  解決方案

                  看來你比 div 更需要 Button:

                   var container = L.DomUtil.create('input');容器.type="按鈕";

                  1. 然后就可以輕松設置鼠標懸停文本了:

                    container.title="沒有貓";

                  2. 還有一些文字而不是圖片:

                    container.value = "42";

                  3. 您可以使用鼠標事件來設置按鈕樣式:

                    container.onmouseover = function(){container.style.backgroundColor = '粉色';}容器.onmouseout = 函數(){container.style.backgroundColor = '白色';}

                  (你當然可以用 css 完成最后一部分,可能更優雅)

                  完整示例:http://codepen.io/anon/pen/oXVMvyp>

                  I followed this control-button-leaflet tutorial and it worked for me. Now I want to:

                  1. show some text when i hover over the button (like with the zoom buttons)
                  2. Change the color of the button when i hover over it
                  3. be able to write text inside the button instead of an image.

                  Here's the code:

                      var customControl =  L.Control.extend({        
                        options: {
                          position: 'topleft'
                        },
                  
                        onAdd: function (map) {
                          var container = L.DomUtil.create('div', 'leaflet-bar leaflet-control leaflet-control-custom');
                  
                          container.style.backgroundColor = 'white';     
                          container.style.backgroundImage = "url(http://t1.gstatic.com/images?q=tbn:ANd9GcR6FCUMW5bPn8C4PbKak2BJQQsmC-K9-mbYBeFZm1ZM2w2GRy40Ew)";
                          container.style.backgroundSize = "30px 30px";
                          container.style.width = '30px';
                          container.style.height = '30px';
                  
                          container.onclick = function(){
                            console.log('buttonClicked');
                          }
                  
                          return container;
                        }
                      });
                  
                      var map;
                  
                      var readyState = function(e){
                        map = new L.Map('map').setView([48.935, 18.14], 14);
                        L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
                        map.addControl(new customControl());
                      }
                  
                      window.addEventListener('DOMContentLoaded', readyState);
                  

                  解決方案

                  It seems you more need a Button than a div:

                      var container = L.DomUtil.create('input');
                      container.type="button";
                  

                  1. Then you can easily set a mouseover text:

                    container.title="No cat";
                    

                  2. And some Text instead of an image:

                    container.value = "42";
                    

                  3. And you can use the mouse events to style the button:

                    container.onmouseover = function(){
                      container.style.backgroundColor = 'pink'; 
                    }
                    container.onmouseout = function(){
                      container.style.backgroundColor = 'white'; 
                    }
                    

                  (you could of course do this last part with css, might be more elegant)

                  Full example: http://codepen.io/anon/pen/oXVMvy

                  這篇關于傳單Js自定義控制按鈕添加(文字,懸停)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Check if a polygon point is inside another in leaflet(檢查一個多邊形點是否在傳單中的另一個內部)
                  Changing leaflet markercluster icon color, inheriting the rest of the default CSS properties(更改傳單標記群集圖標顏色,繼承其余默認 CSS 屬性)
                  Trigger click on leaflet marker(觸發點擊傳單標記)
                  How can I change the default loading tile color in LeafletJS?(如何更改 LeafletJS 中的默認加載磁貼顏色?)
                  Add external geojson to leaflet layer(將外部geojson添加到傳單層)
                  Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側邊欄)

                    • <i id='T2VI8'><tr id='T2VI8'><dt id='T2VI8'><q id='T2VI8'><span id='T2VI8'><b id='T2VI8'><form id='T2VI8'><ins id='T2VI8'></ins><ul id='T2VI8'></ul><sub id='T2VI8'></sub></form><legend id='T2VI8'></legend><bdo id='T2VI8'><pre id='T2VI8'><center id='T2VI8'></center></pre></bdo></b><th id='T2VI8'></th></span></q></dt></tr></i><div class="5bxrfbx" id='T2VI8'><tfoot id='T2VI8'></tfoot><dl id='T2VI8'><fieldset id='T2VI8'></fieldset></dl></div>

                        <small id='T2VI8'></small><noframes id='T2VI8'>

                        • <bdo id='T2VI8'></bdo><ul id='T2VI8'></ul>
                          <tfoot id='T2VI8'></tfoot>
                            <tbody id='T2VI8'></tbody>
                          <legend id='T2VI8'><style id='T2VI8'><dir id='T2VI8'><q id='T2VI8'></q></dir></style></legend>
                          1. 主站蜘蛛池模板: 进口便携式天平,外校_十万分之一分析天平,奥豪斯工业台秤,V2000防水秤-重庆珂偌德科技有限公司(www.crdkj.com) | 氟氨基酮、氯硝柳胺、2-氟苯甲酸、异香兰素-新晨化工 | 【铜排折弯机,钢丝折弯成型机,汽车发泡钢丝折弯机,线材折弯机厂家,线材成型机,铁线折弯机】贝朗折弯机厂家_东莞市贝朗自动化设备有限公司 | 并离网逆变器_高频UPS电源定制_户用储能光伏逆变器厂家-深圳市索克新能源 | R507制冷剂,R22/R152a制冷剂厂家-浙江瀚凯制冷科技有限公司 | 企业微信营销_企业微信服务商_私域流量运营_艾客SCRM官网 | 赛尔特智能移动阳光房-阳光房厂家-赛尔特建筑科技(广东)有限公司 | 杭州代理记账多少钱-注册公司代办-公司注销流程及费用-杭州福道财务管理咨询有限公司 | 通辽信息港 - 免费发布房产、招聘、求职、二手、商铺等信息 www.tlxxg.net | 杭州标识标牌|文化墙|展厅|导视|户内外广告|发光字|灯箱|铭阳制作公司 - 杭州标识标牌|文化墙|展厅|导视|户内外广告|发光字|灯箱|铭阳制作公司 | 深圳3D打印服务-3D打印加工-手板模型加工厂-悟空打印坊 | 番茄畅听邀请码怎么输入 - Dianw8.com| 模具钢_高速钢_不锈钢-万利钢金属材料 | 选矿设备-新型重选设备-金属矿尾矿重选-青州冠诚重工机械有限公司 | 液氮罐_液氮容器_自增压液氮罐-北京君方科仪科技发展有限公司 | 心得体会网_心得体会格式范文模板| 工控机,嵌入式主板,工业主板,arm主板,图像采集卡,poe网卡,朗锐智科 | 万师讲师网-优质讲师培训师供应商,讲师认证,找讲师来万师 | 100_150_200_250_300_350_400公斤压力空气压缩机-舰艇航天配套厂家 | 污水提升器,污水提升泵,地下室排水,增压泵,雨水泵,智能供排水控制器-上海智流泵业有限公司 | 煤矿人员精确定位系统_矿用无线通信系统_煤矿广播系统 | 镀锌角钢_槽钢_扁钢_圆钢_方矩管厂家_镀锌花纹板-海邦钢铁(天津)有限公司 | 温州中研白癜风专科_温州治疗白癜风_温州治疗白癜风医院哪家好_温州哪里治疗白癜风 | 英国公司注册-新加坡公司注册-香港公司开户-离岸公司账户-杭州商标注册-杭州优创企业 | 隐形纱窗|防护纱窗|金刚网防盗纱窗|韦柏纱窗|上海青木装潢制品有限公司|纱窗国标起草单位 | 仪器仪表网 - 永久免费的b2b电子商务平台 | 微型气象仪_气象传感器_防爆气象传感器-天合传感器大全 | 老房子翻新装修,旧房墙面翻新,房屋防水补漏,厨房卫生间改造,室内装潢装修公司 - 一修房屋快修官网 | 环氧乙烷灭菌器_压力蒸汽灭菌器_低温等离子过氧化氢灭菌器 _低温蒸汽甲醛灭菌器_清洗工作站_医用干燥柜_灭菌耗材-环氧乙烷灭菌器_脉动真空压力蒸汽灭菌器_低温等离子灭菌设备_河南省三强医疗器械有限责任公司 | 陕西鹏展科技有限公司| 螺旋绞龙叶片,螺旋输送机厂家,山东螺旋输送机-淄博长江机械制造有限公司 | KBX-220倾斜开关|KBW-220P/L跑偏开关|拉绳开关|DHJY-I隔爆打滑开关|溜槽堵塞开关|欠速开关|声光报警器-山东卓信有限公司 | 安徽合肥格力空调专卖店_格力中央空调_格力空调总经销公司代理-皖格制冷设备 | 乳化沥青设备_改性沥青设备_沥青加温罐_德州市昊通路桥工程有限公司 | 物流之家新闻网-最新物流新闻|物流资讯|物流政策|物流网-匡匡奈斯物流科技 | 盘煤仪,盘料仪,盘点仪,堆料测量仪,便携式激光盘煤仪-中科航宇(北京)自动化工程技术有限公司 | 截齿|煤截齿|采煤机截齿|掘进机截齿|旋挖截齿-山东卓力截齿厂家报价 | 临时厕所租赁_玻璃钢厕所租赁_蹲式|坐式厕所出租-北京慧海通 | 哈希余氯测定仪,分光光度计,ph在线监测仪,浊度测定仪,试剂-上海京灿精密机械有限公司 | 卫生纸复卷机|抽纸机|卫生纸加工设备|做卫生纸机器|小型卫生纸加工需要什么设备|卫生纸机器设备多少钱一台|许昌恒源纸品机械有限公司 | 物联网卡_物联网卡购买平台_移动物联网卡办理_移动联通电信流量卡通信模组采购平台? |