• <tfoot id='2bxhQ'></tfoot>
    <legend id='2bxhQ'><style id='2bxhQ'><dir id='2bxhQ'><q id='2bxhQ'></q></dir></style></legend>
      <bdo id='2bxhQ'></bdo><ul id='2bxhQ'></ul>

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

        CSS减轻父鼠标悬停的子元素

        CSS lighten child elements on parent mouseover(CSS减轻父鼠标悬停的子元素)
        1. <small id='NgrwT'></small><noframes id='NgrwT'>

          • <bdo id='NgrwT'></bdo><ul id='NgrwT'></ul>

                <tfoot id='NgrwT'></tfoot>

              • <i id='NgrwT'><tr id='NgrwT'><dt id='NgrwT'><q id='NgrwT'><span id='NgrwT'><b id='NgrwT'><form id='NgrwT'><ins id='NgrwT'></ins><ul id='NgrwT'></ul><sub id='NgrwT'></sub></form><legend id='NgrwT'></legend><bdo id='NgrwT'><pre id='NgrwT'><center id='NgrwT'></center></pre></bdo></b><th id='NgrwT'></th></span></q></dt></tr></i><div id='NgrwT'><tfoot id='NgrwT'></tfoot><dl id='NgrwT'><fieldset id='NgrwT'></fieldset></dl></div>
                <legend id='NgrwT'><style id='NgrwT'><dir id='NgrwT'><q id='NgrwT'></q></dir></style></legend>
                  <tbody id='NgrwT'></tbody>
                • 本文介绍了CSS减轻父鼠标悬停的子元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  这是我的问题.
                  我有一个 div,其中包含另外两个 div:基本上一个用于标题,一个用于内容.

                  here is my problem.
                  I have a div which contains two other divs: basically one for header, one for content.

                  当用户将鼠标指向父 div 时,我想点亮(更改 alpha 级别,或欢迎使用其他方法).两个子 divs 的颜色应该会改变并变得稍微浅一些.如果可能,我想避免使用 javascript.

                  I'd like to lighten (change alpha level, or some other method is welcomed), when the user points the mouse over the parent div. Colors of both child divs should change and become slightly lighter. I'd like to avoid javascript if possible.

                  如何在 CSS 中做到这一点?

                  How to do this in CSS?

                  推荐答案

                  这样吗?

                  现场演示

                  相关 CSS:

                  #container:hover .inner {
                      opacity: 0.8
                  }
                  

                  HTML:

                  <div id="container">
                      <div id="left" class="inner"></div>
                      <div id="right" class="inner"></div>
                  </div>
                  

                  不相关的 CSS:

                  #container {
                      width: 300px;
                      padding: 30px;
                      overflow: hidden
                  }
                  
                  .inner {
                      width: 40%;
                      height: 250px;
                      background: #ccc
                  }
                  #left {
                      float: left
                  }
                  #right {
                      float: right
                  }
                  

                  真正无关的 CSS:

                  #container {
                      background: #fcecfc; /* old browsers */
                      background: -moz-linear-gradient(top, #fcecfc 0%, #fba6e1 50%, #fd89d7 51%, #ff7cd8 100%); /* firefox */
                  
                      background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fcecfc), color-stop(50%,#fba6e1), color-stop(51%,#fd89d7), color-stop(100%,#ff7cd8)); /* webkit */
                  
                      filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcecfc', endColorstr='#ff7cd8',GradientType=0 ); /* ie */
                  }
                  

                  这篇关于CSS减轻父鼠标悬停的子元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  quot;Each child in an array should have a unique key propquot; only on first time render of page(“数组中的每个孩子都应该有一个唯一的 key prop仅在第一次呈现页面时)
                  How do I make a TextGeometry multiline? How do I put it inside a square so it wraps like html text does inside a div?(如何制作 TextGeometry 多线?如何将它放在一个正方形内,以便它像 html 文本一样包裹在 div 内?) - IT屋-程序员软件开发技术分享社
                  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 表格单元格间距)
                  Put in bold part of description in metatag Drupal module(将描述的粗体部分放在元标记 Drupal 模块中)

                  • <bdo id='EkNcA'></bdo><ul id='EkNcA'></ul>

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

                        <tfoot id='EkNcA'></tfoot>