<tfoot id='WYu3X'></tfoot>
  • <i id='WYu3X'><tr id='WYu3X'><dt id='WYu3X'><q id='WYu3X'><span id='WYu3X'><b id='WYu3X'><form id='WYu3X'><ins id='WYu3X'></ins><ul id='WYu3X'></ul><sub id='WYu3X'></sub></form><legend id='WYu3X'></legend><bdo id='WYu3X'><pre id='WYu3X'><center id='WYu3X'></center></pre></bdo></b><th id='WYu3X'></th></span></q></dt></tr></i><div id='WYu3X'><tfoot id='WYu3X'></tfoot><dl id='WYu3X'><fieldset id='WYu3X'></fieldset></dl></div>
      <legend id='WYu3X'><style id='WYu3X'><dir id='WYu3X'><q id='WYu3X'></q></dir></style></legend>

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

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

      1. 如何在点击时获得 css 悬停值?

        How to get css hover values on click?(如何在点击时获得 css 悬停值?)
      2. <small id='OA0ZO'></small><noframes id='OA0ZO'>

      3. <i id='OA0ZO'><tr id='OA0ZO'><dt id='OA0ZO'><q id='OA0ZO'><span id='OA0ZO'><b id='OA0ZO'><form id='OA0ZO'><ins id='OA0ZO'></ins><ul id='OA0ZO'></ul><sub id='OA0ZO'></sub></form><legend id='OA0ZO'></legend><bdo id='OA0ZO'><pre id='OA0ZO'><center id='OA0ZO'></center></pre></bdo></b><th id='OA0ZO'></th></span></q></dt></tr></i><div id='OA0ZO'><tfoot id='OA0ZO'></tfoot><dl id='OA0ZO'><fieldset id='OA0ZO'></fieldset></dl></div>
      4. <tfoot id='OA0ZO'></tfoot>
          <tbody id='OA0ZO'></tbody>
        <legend id='OA0ZO'><style id='OA0ZO'><dir id='OA0ZO'><q id='OA0ZO'></q></dir></style></legend>

                  <bdo id='OA0ZO'></bdo><ul id='OA0ZO'></ul>
                  本文介绍了如何在点击时获得 css 悬停值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  跟进这个 问题,我还有另一个问题 - 单击文本链接时如何获取 css 悬停值?

                  Following up on this question, I have another issue - how to get css hover values when you click on a text link?

                  例如,我有文本悬停的这些值

                  For instance, I have these values for the text hover

                  a.test {
                      text-decoration:none;
                  }
                  
                  a.test:hover {
                      text-decoration:none;
                      opacity:0.6 !important;
                      -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; 
                      filter:alpha(opacity=60) !important; 
                  }
                  
                  <a href="#" class="test">Click Me</a>
                  

                  这当然失败了!

                  $(".test").click(function(){
                     alert($(this).css());
                     return false;
                  })
                  

                  有可能吗?

                  我遇到了类似的问题,但我不想使用那个插件.

                  I came across this similar question but I prefer not to use that plugin.

                  推荐答案

                  你可以做这样的事情,你可以创建自己的 CSS 属性列表,这些属性将应用于该元素(假设你有一个列表),然后循环通过他们:

                  You could do something like this, where you create your own list of css properties that would be applied to that element (assuming you had a list) and then cycle through them:

                  var cssList = ['text-decoration','opacity','filter'];
                  
                  $(".test").click(function(){
                      for(x in cssList){
                          alert($(this).css(cssList[x]));
                      }    
                     return false;
                  })
                  

                  示例:http://jsfiddle.net/jasongennaro/GmWCz/

                  当然,如果你需要的话,你可以一直使用它并添加所有属性.

                  Of course, you could take this all the way and add all the properties, if that is what you needed.

                  这篇关于如何在点击时获得 css 悬停值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Move link image 5px up on hover(悬停时将链接图像向上移动 5px)
                  How do I inspect CSS pseudo classes with firebug?(如何使用 firebug 检查 CSS 伪类?)
                  Why doesn#39;t CSS hover work on table rows when the cells inside the rows have class names?(当行内的单元格具有类名时,为什么 CSS 悬停在表格行上不起作用?)
                  Hover image - display div over it(悬停图像 - 在其上显示 div)
                  How to apply a CSS class on hover to dynamically generated submit buttons?(如何在悬停时将 CSS 类应用于动态生成的提交按钮?)
                  Differences between CSS3 :hover and :focus?(CSS3 :hover 和 :focus 的区别?)
                  <tfoot id='q9cxA'></tfoot>

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

                      <tbody id='q9cxA'></tbody>

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