<legend id='R0BUF'><style id='R0BUF'><dir id='R0BUF'><q id='R0BUF'></q></dir></style></legend>

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

    2. <tfoot id='R0BUF'></tfoot>

        如何通过孩子更改父样式:LESS中的悬停动作

        How to change parent style by child :hover action in LESS(如何通过孩子更改父样式:LESS中的悬停动作)
          1. <legend id='lqKD7'><style id='lqKD7'><dir id='lqKD7'><q id='lqKD7'></q></dir></style></legend>

              <tfoot id='lqKD7'></tfoot>

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

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

                    <tbody id='lqKD7'></tbody>
                1. <i id='lqKD7'><tr id='lqKD7'><dt id='lqKD7'><q id='lqKD7'><span id='lqKD7'><b id='lqKD7'><form id='lqKD7'><ins id='lqKD7'></ins><ul id='lqKD7'></ul><sub id='lqKD7'></sub></form><legend id='lqKD7'></legend><bdo id='lqKD7'><pre id='lqKD7'><center id='lqKD7'></center></pre></bdo></b><th id='lqKD7'></th></span></q></dt></tr></i><div id='lqKD7'><tfoot id='lqKD7'></tfoot><dl id='lqKD7'><fieldset id='lqKD7'></fieldset></dl></div>

                2. 本文介绍了如何通过孩子更改父样式:LESS中的悬停动作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  I have this LESS setup:

                  .wrapper {
                      .parent {
                         height: 100px;
                  
                         .children {
                            //some style;
                  
                            &:hover {
                  
                                .parent & {
                                   height: 150px;
                                }
                            }
                         }
                      }
                  }
                  

                  I need to change some height for parent element by hover on some child inside of it. This code is not working, so is there any possible to do this? Much thx for help.

                  解决方案

                  Adding the :hover to the .parent instead of the .children div will achieve the result, http://codepen.io/duncanbeattie/pen/xvDdu

                  .wrapper {
                      .parent {
                          pointer-events:none;
                          height: 100px;
                          background:#000;
                          .children {
                              //some style;
                              height:20px;
                              background:#f00;
                              pointer-events:all;
                          }
                          &:hover {
                              height:150px;
                          }
                      }
                  }
                  

                  这篇关于如何通过孩子更改父样式:LESS中的悬停动作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Scale background image to fit ie8 window(缩放背景图像以适合 ie8 窗口)
                  @fontface in IE7 (IETEster) not working properly(IE7 (IETEster) 中的@fontface 无法正常工作)
                  Safari 5.1 breaks CSS table cell spacing(Safari 5.1 打破 CSS 表格单元格间距)
                  How to delegate `hover()` function by using `on()`(如何使用 `on()` 委托 `hover()` 函数)
                  How to center slider in css?(如何在css中居中滑块?)
                  Show slider range value on top of thumb(在拇指顶部显示滑块范围值)
                  <tfoot id='LVpbL'></tfoot>
                    <i id='LVpbL'><tr id='LVpbL'><dt id='LVpbL'><q id='LVpbL'><span id='LVpbL'><b id='LVpbL'><form id='LVpbL'><ins id='LVpbL'></ins><ul id='LVpbL'></ul><sub id='LVpbL'></sub></form><legend id='LVpbL'></legend><bdo id='LVpbL'><pre id='LVpbL'><center id='LVpbL'></center></pre></bdo></b><th id='LVpbL'></th></span></q></dt></tr></i><div id='LVpbL'><tfoot id='LVpbL'></tfoot><dl id='LVpbL'><fieldset id='LVpbL'></fieldset></dl></div>

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

                              <tbody id='LVpbL'></tbody>

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

                            <legend id='LVpbL'><style id='LVpbL'><dir id='LVpbL'><q id='LVpbL'></q></dir></style></legend>