久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <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="qwawimqqmiuu" 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="qwawimqqmiuu" 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="qwawimqqmiuu" 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>

                          • 主站蜘蛛池模板: 天天久久 | 久久狠狠| 免费av一区二区三区 | av免费成人| a在线视频观看 | 亚洲成人免费在线 | 精品国产乱码久久久久久蜜柚 | 日本不卡一区 | 激情亚洲| 精品少妇一区二区三区在线播放 | 青草久久免费视频 | 中文字幕免费视频 | 国内自拍视频在线观看 | 自拍视频精品 | 国产免费一区二区 | 日韩中文字幕在线观看 | 99精品欧美一区二区蜜桃免费 | 欧洲精品在线观看 | 一区二区蜜桃 | 欧美日韩免费 | 亚洲福利视频一区二区 | 久久y| 亚洲国产成人av好男人在线观看 | 日韩中文字幕免费在线观看 | 久草免费在线视频 | 亚洲视频免费一区 | 亚洲性视频网站 | 国产欧美精品一区二区三区 | 亚洲成人av一区二区 | 成人高清网站 | 国产精品国产a | 国产一区二区三区久久久久久久久 | 国产精品美女久久久久久久久久久 | 91久久夜色精品国产网站 | 亚洲国产精品久久久久秋霞不卡 | 欧美一区二区三区视频 | 亚洲视频 欧美视频 | 亚洲欧洲日韩 | 欧美一区二区在线播放 | 日韩欧美理论片 | 午夜精品视频在线观看 |