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

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

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

    1. <tfoot id='QHg5j'></tfoot>

        为什么我的 img hover 不起作用?

        Why does my img hover not work?(为什么我的 img hover 不起作用?)
          <tbody id='brTk9'></tbody>

          <bdo id='brTk9'></bdo><ul id='brTk9'></ul>
          • <tfoot id='brTk9'></tfoot>

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

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

                  本文介绍了为什么我的 img hover 不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试设置为 opacity: .04;,当悬停在 opacity:1; 上时,我的 img 悬停不是运作.我不确定这是为什么.有人可以帮助我了解我的问题出在哪里吗?

                  我的html:

                  .container2 {边距:0px;填充:0px;}.介绍 {宽度:100%;位置:相对;溢出:隐藏;边距:0;填充顶部:0;}.pic1 {位置:绝对;顶部:0;宽度:100%;高度:100%;}.intro-img {显示:块;边距:0 自动;最小宽度:100%;不透明度:0.4;}.pic1 img:悬停{不透明度:1;}.wrapper {高度:200px;最小高度:200px;位置:相对;填充底部:0;}.蓝色 {背景:#22428e;颜色:#fff;}.绿色 {背景:#de0e00;颜色:#fff;}#颜色内容{高度:200px;-moz-box-sizing:边框框;-webkit-box-sizing:边框框;box-sizing:边框框;宽度:330px;填充:0 25px;左边距:3em;}h1 {文本转换:大写;字体:700 32px/35px'Gotham SSm A', 'Gotham SSm B', Arial, Helvetica, sans-serif;边距:0 0 34px;填充顶部:28px;}p {边距顶部:-10px;}一个 {文字装饰:无;白颜色;}一:悬停{颜色:黑色;}@media screen and (max-width: 454px) {.wrapper {最小高度:100px;位置:相对;}#颜色内容{高度:200px;-moz-box-sizing:边框框;-webkit-box-sizing:边框框;box-sizing:边框框;宽度:100%;填充:0 25px;左边距:-4px;}#pic1 {显示:无;}}

                  <div class="container2"><div 类="介绍"><div 类="pic1"><img class="intro-img" src="https://s23.postimg.org/94clk2prf/resources_gender_spectrum2.png"></div><!-- 结束 pic1 --><div 类="包装器"><文章类="蓝色" id="颜色-内容">

                  <a href=""><h1>性别Spectrum.com </h1></a><p>我走了,所以我走了这么久哈哈哈哈,我是不是该去他妈的它啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊是啊</div></文章><!-- 文章结束--></div><!-- 结束包装器--></div><!-- 结束介绍--></div><!-- 容器 2 结束 -->

                  解决方案

                  你的 .wrapper 元素覆盖你的图像.这就是为什么鼠标事件不会在其后面的元素上触发的原因.

                  我给了 .wrapper { margin-top: 200px;} 所以你会看到它一旦被修复就可以工作了.

                  .container2 {边距:0;填充:0;}.介绍 {宽度:100%;位置:相对;溢出:隐藏;边距:0;填充顶部:0;}.pic1 {位置:绝对;顶部:0;宽度:100%;高度:100%;}.intro-img {显示:块;边距:0 自动;最小宽度:100%;不透明度:0.4;}.pic1 img:悬停{不透明度:1;}.wrapper {高度:200px;最小高度:200px;位置:相对;填充底部:0;边距顶部:200px;}.蓝色 {背景:#22428e;颜色:#fff;}.绿色 {背景:#de0e00;颜色:#fff;}#颜色内容{高度:200px;-moz-box-sizing:边框框;-webkit-box-sizing:边框框;box-sizing:边框框;宽度:330px;填充:0 25px;左边距:3em;}h1 {文本转换:大写;字体:700 32px/35px'Gotham SSm A', 'Gotham SSm B', Arial, Helvetica, sans-serif;边距:0 0 34px;填充顶部:28px;}p {边距顶部:-10px;}一个 {文字装饰:无;白颜色;}一:悬停{颜色:黑色;}@media screen and (max-width: 454px) {.wrapper {最小高度:100px;位置:相对;}#颜色内容{高度:200px;-moz-box-sizing:边框框;-webkit-box-sizing:边框框;box-sizing:边框框;宽度:100%;填充:0 25px;左边距:-4px;}#pic1 {显示:无;}}

                  <div class="container2"><div 类="介绍"><div 类="pic1"><img class="intro-img" src="https://s23.postimg.org/94clk2prf/resources_gender_spectrum2.png"></div><!-- 结束 pic1 --><div 类="包装器"><文章类="蓝色" id="颜色-内容">

                  <a href=""><h1>性别Spectrum.com </h1></a><p>我走了,所以我走了这么久哈哈哈哈,我是不是该去他妈的它啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊是啊</div></文章><!-- 文章结束--></div><!-- 结束包装器--></div><!-- 结束介绍--></div><!-- 容器 2 结束 -->

                  I am trying to get to be set to an opacity: .04;, and when hovered over to be opacity:1; however, my img hover is not functioning. I am unsure of why this is. Can someone help me understand where my problem is?

                  my html:

                  .container2 {
                    margin: 0px;
                    padding: 0px;
                  }
                  .intro {
                    width: 100%;
                    position: relative;
                    overflow: hidden;
                    margin: 0;
                    padding-top: 0;
                  }
                  .pic1 {
                    position: absolute;
                    top: 0;
                    width: 100%;
                    height: 100%;
                  }
                  .intro-img {
                    display: block;
                    margin: 0 auto;
                    min-width: 100%;
                    opacity: 0.4;
                  }
                  .pic1 img:hover {
                    opacity: 1;
                  }
                  .wrapper {
                    height: 200px;
                    min-height: 200px;
                    position: relative;
                    padding-bottom: 0;
                  }
                  .blue {
                    background: #22428e;
                    color: #fff;
                  }
                  .green {
                    background: #de0e00;
                    color: #fff;
                  }
                  #colors-content {
                    height: 200px;
                    -moz-box-sizing: border-box;
                    -webkit-box-sizing: border-box;
                    box-sizing: border-box;
                    width: 330px;
                    padding: 0 25px;
                    margin-left: 3em;
                  }
                  h1 {
                    text-transform: uppercase;
                    font: 700 32px/35px'Gotham SSm A', 'Gotham SSm B', Arial, Helvetica, sans-serif;
                    margin: 0 0 34px;
                    padding-top: 28px;
                  }
                  p {
                    margin-top: -10px;
                  }
                  a {
                    text-decoration: none;
                    color: white;
                  }
                  a:hover {
                    color: black;
                  }
                  @media screen and (max-width: 454px) {
                    .wrapper {
                      min-height: 100px;
                      position: relative;
                    }
                    #colors-content {
                      height: 200px;
                      -moz-box-sizing: border-box;
                      -webkit-box-sizing: border-box;
                      box-sizing: border-box;
                      width: 100%;
                      padding: 0 25px;
                      margin-left: -4px;
                    }
                    #pic1 {
                      display: none;
                    }
                  }

                  <div class="container2">
                    <div class="intro">
                      <div class="pic1">
                        <img class="intro-img" src="https://s23.postimg.org/94clk2prf/resources_gender_spectrum2.png">
                      </div>
                      <!-- End pic1 -->
                      <div class="wrapper">
                        <article class="blue" id="colors-content">
                          <div>
                            <a href="">
                              <h1> Gender
                            Spectrum.com </h1> 
                            </a>
                            <p>I'm gone so i'me gone so long hah haha aha im bout it fuck it aiash hth as jasd ashd as ahsdjas r ajsgda uaju ashd ujawh uu ajshdhuiae</p>
                          </div>
                        </article>
                        <!-- End of article -->
                      </div>
                      <!-- End wrapper -->
                    </div>
                    <!-- End intro -->
                  </div>
                  <! -- End of container2 -->

                  解决方案

                  Your .wrapper element is covering your image. This why mouse events do not trigger on the elements behind it.

                  I gave .wrapper { margin-top: 200px; } so you see it works as soon as that is fixed.

                  .container2 {
                    margin: 0;
                    padding: 0;
                  }
                  .intro {
                    width: 100%;
                    position: relative;
                    overflow: hidden;
                    margin: 0;
                    padding-top: 0;
                  }
                  .pic1 {
                    position: absolute;
                    top: 0;
                    width: 100%;
                    height: 100%;
                  }
                  .intro-img {
                    display: block;
                    margin: 0 auto;
                    min-width: 100%;
                    opacity: 0.4;
                  }
                  .pic1 img:hover {
                    opacity: 1;
                  }
                  .wrapper {
                    height: 200px;
                    min-height: 200px;
                    position: relative;
                    padding-bottom: 0;
                    margin-top: 200px;
                  }
                  .blue {
                    background: #22428e;
                    color: #fff;
                  }
                  .green {
                    background: #de0e00;
                    color: #fff;
                  }
                  #colors-content {
                    height: 200px;
                    -moz-box-sizing: border-box;
                    -webkit-box-sizing: border-box;
                    box-sizing: border-box;
                    width: 330px;
                    padding: 0 25px;
                    margin-left: 3em;
                  }
                  h1 {
                    text-transform: uppercase;
                    font: 700 32px/35px'Gotham SSm A', 'Gotham SSm B', Arial, Helvetica, sans-serif;
                    margin: 0 0 34px;
                    padding-top: 28px;
                  }
                  p {
                    margin-top: -10px;
                  }
                  a {
                    text-decoration: none;
                    color: white;
                  }
                  a:hover {
                    color: black;
                  }
                  @media screen and (max-width: 454px) {
                    .wrapper {
                      min-height: 100px;
                      position: relative;
                    }
                    #colors-content {
                      height: 200px;
                      -moz-box-sizing: border-box;
                      -webkit-box-sizing: border-box;
                      box-sizing: border-box;
                      width: 100%;
                      padding: 0 25px;
                      margin-left: -4px;
                    }
                    #pic1 {
                      display: none;
                    }
                  }

                  <div class="container2">
                    <div class="intro">
                      <div class="pic1">
                        <img class="intro-img" src="https://s23.postimg.org/94clk2prf/resources_gender_spectrum2.png">
                      </div>
                      <!-- End pic1 -->
                      <div class="wrapper">
                        <article class="blue" id="colors-content">
                          <div>
                            <a href="">
                              <h1> Gender
                            Spectrum.com </h1> 
                            </a>
                            <p>I'm gone so i'me gone so long hah haha aha im bout it fuck it aiash hth as jasd ashd as ahsdjas r ajsgda uaju ashd ujawh uu ajshdhuiae</p>
                          </div>
                        </article>
                        <!-- End of article -->
                      </div>
                      <!-- End wrapper -->
                    </div>
                    <!-- End intro -->
                  </div>
                  <! -- End of container2 -->

                  这篇关于为什么我的 img hover 不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 的区别?)
                  • <bdo id='zyYjf'></bdo><ul id='zyYjf'></ul>
                        <tfoot id='zyYjf'></tfoot>

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

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

                              <tbody id='zyYjf'></tbody>

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