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

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

    1. <i id='BpYfb'><tr id='BpYfb'><dt id='BpYfb'><q id='BpYfb'><span id='BpYfb'><b id='BpYfb'><form id='BpYfb'><ins id='BpYfb'></ins><ul id='BpYfb'></ul><sub id='BpYfb'></sub></form><legend id='BpYfb'></legend><bdo id='BpYfb'><pre id='BpYfb'><center id='BpYfb'></center></pre></bdo></b><th id='BpYfb'></th></span></q></dt></tr></i><div class="sz5vnxz" id='BpYfb'><tfoot id='BpYfb'></tfoot><dl id='BpYfb'><fieldset id='BpYfb'></fieldset></dl></div>
      <tfoot id='BpYfb'></tfoot><legend id='BpYfb'><style id='BpYfb'><dir id='BpYfb'><q id='BpYfb'></q></dir></style></legend>

        <bdo id='BpYfb'></bdo><ul id='BpYfb'></ul>

      1. 根據單獨元素中的光標位置旋轉元素

        Rotating an element based on cursor position in a separate element(根據單獨元素中的光標位置旋轉元素)

        1. <small id='nSQtW'></small><noframes id='nSQtW'>

          <legend id='nSQtW'><style id='nSQtW'><dir id='nSQtW'><q id='nSQtW'></q></dir></style></legend>
                <bdo id='nSQtW'></bdo><ul id='nSQtW'></ul>
              • <i id='nSQtW'><tr id='nSQtW'><dt id='nSQtW'><q id='nSQtW'><span id='nSQtW'><b id='nSQtW'><form id='nSQtW'><ins id='nSQtW'></ins><ul id='nSQtW'></ul><sub id='nSQtW'></sub></form><legend id='nSQtW'></legend><bdo id='nSQtW'><pre id='nSQtW'><center id='nSQtW'></center></pre></bdo></b><th id='nSQtW'></th></span></q></dt></tr></i><div class="o0hzzu5" id='nSQtW'><tfoot id='nSQtW'></tfoot><dl id='nSQtW'><fieldset id='nSQtW'></fieldset></dl></div>
                  <tfoot id='nSQtW'></tfoot>
                    <tbody id='nSQtW'></tbody>
                1. 本文介紹了根據單獨元素中的光標位置旋轉元素的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  I've been Working on a breadcrumbs directory feature recently that requires an element to rotate based on the cursor x position within the breadcrumbs container element. Long story short, I need the arrow in the lower '#pointer-box' to always point at the cursor when it's within the '#target-box'.

                  I'm looking for two separate formulas that will a.) set the initial left-most position of the arrow when the '#target-box' cursor x position is at 0, and b.) keep the arrow's left-most and right-most rotation properties proportional at any browser width or on window resize.

                  Any help is greatly appreciated.

                  Here's the live demo. http://jsfiddle.net/HeFqh/

                  Thank you

                  Update

                  With help from Tats_innit I was able to get the arrow pointing at the cursor when it's inside the '#target-box'. Now I have two specific issues to solve.

                  a.) When the window is resized the arrow and cursor are no longer aligned.

                  b.) The 'var y' on 'mousemove' is not deducting the top offset

                  var y = e.pageY - this.offsetTop
                  

                  The updated live demo. http://jsfiddle.net/HeFqh/11/

                  Thank you

                  解決方案

                  Hiya from @brenjt's :) response above pasting this as answer post & here is a sample demo http://jsfiddle.net/JqBZb/

                  Thanks and further helpful link here: jQuery resize to aspect ratio & here How to resize images proportionally / keeping the aspect ratio?

                  Please let me know if I missed anything! Hope this helps! have a nice one, Cheers!

                  jquery code

                  var img = $('.image');
                  if(img.length > 0){
                      var offset = img.offset();
                      function mouse(evt){
                          var center_x = (offset.left) + (img.width()/2);
                          var center_y = (offset.top) + (img.height()/2);
                          var mouse_x = evt.pageX; var mouse_y = evt.pageY;
                          var radians = Math.atan2(mouse_x - center_x, mouse_y - center_y);
                          var degree = (radians * (180 / Math.PI) * -1) + 90; 
                          img.css('-moz-transform', 'rotate('+degree+'deg)');
                          img.css('-webkit-transform', 'rotate('+degree+'deg)');
                          img.css('-o-transform', 'rotate('+degree+'deg)');
                          img.css('-ms-transform', 'rotate('+degree+'deg)');
                      }
                      $(document).mousemove(mouse);
                  }
                  
                  ?
                  

                  這篇關于根據單獨元素中的光標位置旋轉元素的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                  What is the difference between XMLHttpRequest, jQuery.ajax, jQuery.post, jQuery.get(XMLHttpRequest、jQuery.ajax、jQuery.post、jQuery.get 有什么區別)
                  Can onprogress functionality be added to jQuery.ajax() by using xhrFields?(可以使用 xhrFields 將 onprogress 功能添加到 jQuery.ajax() 嗎?)
                  Show a progress bar for downloading files using XHR2/AJAX(顯示使用 XHR2/AJAX 下載文件的進度條)
                  How can I open a JSON file in JavaScript without jQuery?(如何在沒有 jQuery 的情況下在 JavaScript 中打開 JSON 文件?)
                    <tbody id='RxhcT'></tbody>

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

                      <tfoot id='RxhcT'></tfoot>
                      1. <i id='RxhcT'><tr id='RxhcT'><dt id='RxhcT'><q id='RxhcT'><span id='RxhcT'><b id='RxhcT'><form id='RxhcT'><ins id='RxhcT'></ins><ul id='RxhcT'></ul><sub id='RxhcT'></sub></form><legend id='RxhcT'></legend><bdo id='RxhcT'><pre id='RxhcT'><center id='RxhcT'></center></pre></bdo></b><th id='RxhcT'></th></span></q></dt></tr></i><div class="0mbtegm" id='RxhcT'><tfoot id='RxhcT'></tfoot><dl id='RxhcT'><fieldset id='RxhcT'></fieldset></dl></div>
                          <bdo id='RxhcT'></bdo><ul id='RxhcT'></ul>
                            <legend id='RxhcT'><style id='RxhcT'><dir id='RxhcT'><q id='RxhcT'></q></dir></style></legend>

                          • 主站蜘蛛池模板: 网站建设,北京网站建设,北京网站建设公司,网站系统开发,北京网站制作公司,响应式网站,做网站公司,海淀做网站,朝阳做网站,昌平做网站,建站公司 | 液压油缸-液压站生产厂家-洛阳泰诺液压科技有限公司 | 齿式联轴器-弹性联轴器-联轴器厂家-江苏诺兴传动联轴器制造有限公司 | 水轮机密封网 | 水轮机密封产品研发生产厂家| 点胶机_点胶阀_自动点胶机_智能点胶机_喷胶机_点胶机厂家【欧力克斯】 | 大型果蔬切片机-水果冬瓜削皮机-洗菜机切菜机-肇庆市凤翔餐饮设备有限公司 | 带式压滤机_污泥压滤机_污泥脱水机_带式过滤机_带式压滤机厂家-河南恒磊环保设备有限公司 | 营养师网,营养师考试时间,报名入口—网站首页 | 杭州代理记账多少钱-注册公司代办-公司注销流程及费用-杭州福道财务管理咨询有限公司 | 济南律师,济南法律咨询,山东法律顾问-山东沃德律师事务所 | 气动球阀_衬氟蝶阀_调节阀_电动截止阀_上海沃托阀门有限公司 | 主题班会网 - 安全教育主题班会,各类主题班会PPT模板 | 耙式干燥机_真空耙式干燥机厂家-无锡鹏茂化工装备有限公司 | 半自动预灌装机,卡式瓶灌装机,注射器灌装机,给药器灌装机,大输液灌装机,西林瓶灌装机-长沙一星制药机械有限公司 | 全自动过滤器_反冲洗过滤器_自清洗过滤器_量子除垢环_量子环除垢_量子除垢 - 安士睿(北京)过滤设备有限公司 | 除尘布袋_液体过滤袋_针刺毡滤料-杭州辉龙过滤技术有限公司 | 土壤墒情监测站_土壤墒情监测仪_土壤墒情监测系统_管式土壤墒情站-山东风途物联网 | 首页_欧瑞传动官方网站--主营变频器、伺服系统、新能源、软起动器、PLC、HMI | 金属回收_废铜废铁回收_边角料回收_废不锈钢回收_废旧电缆线回收-广东益夫金属回收公司 | 截齿|煤截齿|采煤机截齿|掘进机截齿|旋挖截齿-山东卓力截齿厂家报价 | 南京展台搭建-南京展会设计-南京展览设计公司-南京展厅展示设计-南京汇雅展览工程有限公司 | 膜结构停车棚-自行车棚-膜结构汽车棚加工安装厂家幸福膜结构 | 长沙中央空调维修,中央空调清洗维保,空气能热水工程,价格,公司就找维小保-湖南维小保环保科技有限公司 | 艾默生变频器,艾默生ct,变频器,ct驱动器,广州艾默生变频器,供水专用变频器,风机变频器,电梯变频器,艾默生变频器代理-广州市盟雄贸易有限公司官方网站-艾默生变频器应用解决方案服务商 | LED灯杆屏_LED广告机_户外LED广告机_智慧灯杆_智慧路灯-太龙智显科技(深圳)有限公司 | 防潮防水通风密闭门源头实力厂家 - 北京酷思帝克门窗 | 大型冰雕-景区冰雕展制作公司,3D创意设计源头厂家-[赛北冰雕] | PCB厂|线路板厂|深圳线路板厂|软硬结合板厂|电路板生产厂家|线路板|深圳电路板厂家|铝基板厂家|深联电路-专业生产PCB研发制造 | 智能垃圾箱|垃圾房|垃圾分类亭|垃圾分类箱专业生产厂家定做-宿迁市传宇环保设备有限公司 | 密集架|电动密集架|移动密集架|黑龙江档案密集架-大量现货厂家销售 | 自动钻孔机-全自动数控钻孔机生产厂家-多米(广东)智能装备有限公司 | DWS物流设备_扫码称重量方一体机_快递包裹分拣机_广东高臻智能装备有限公司 | 杭州|上海贴标机-百科 | 承插管件_不锈钢承插管件_锻钢高压管件-温州科正阀门管件有限公司 | 泰兴市热钻机械有限公司-热熔钻孔机-数控热熔钻-热熔钻孔攻牙一体机 | 槽钢冲孔机,槽钢三面冲,带钢冲孔机-山东兴田阳光智能装备股份有限公司 | 集菌仪厂家_全封闭_封闭式_智能智能集菌仪厂家-上海郓曹 | 精益专家 - 设备管理软件|HSE管理系统|设备管理系统|EHS安全管理系统 | 杭州中央空调维修_冷却塔/新风机柜/热水器/锅炉除垢清洗_除垢剂_风机盘管_冷凝器清洗-杭州亿诺能源有限公司 | 广州冷却塔维修厂家_冷却塔修理_凉水塔风机电机填料抢修-广东康明节能空调有限公司 | 硬度计,金相磨抛机_厂家-莱州华煜众信试验仪器有限公司 |