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

    1. <legend id='0gTIQ'><style id='0gTIQ'><dir id='0gTIQ'><q id='0gTIQ'></q></dir></style></legend>

      <small id='0gTIQ'></small><noframes id='0gTIQ'>

      1. 在悬停时显示特定的div?仅使用 css 和 html

        display specific div on hover? using css and html only(在悬停时显示特定的div?仅使用 css 和 html)
          <tbody id='0HF0s'></tbody>
        <legend id='0HF0s'><style id='0HF0s'><dir id='0HF0s'><q id='0HF0s'></q></dir></style></legend>
        <i id='0HF0s'><tr id='0HF0s'><dt id='0HF0s'><q id='0HF0s'><span id='0HF0s'><b id='0HF0s'><form id='0HF0s'><ins id='0HF0s'></ins><ul id='0HF0s'></ul><sub id='0HF0s'></sub></form><legend id='0HF0s'></legend><bdo id='0HF0s'><pre id='0HF0s'><center id='0HF0s'></center></pre></bdo></b><th id='0HF0s'></th></span></q></dt></tr></i><div id='0HF0s'><tfoot id='0HF0s'></tfoot><dl id='0HF0s'><fieldset id='0HF0s'></fieldset></dl></div>

        <small id='0HF0s'></small><noframes id='0HF0s'>

            • <bdo id='0HF0s'></bdo><ul id='0HF0s'></ul>
              <tfoot id='0HF0s'></tfoot>
                1. 本文介绍了在悬停时显示特定的div?仅使用 css 和 html的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想显示第二个 div(在 HTML 中),类 dikha 将光标悬停在锚标记上.

                  I want to show second div (in HTML) with class dikha on cursor hover over anchor tag.

                  HTML 代码:

                  <a>Hover over me!</a>
                  <div class="faraz"> sdjfg </div>
                  <div class="dikha">Stuff shown on hover</div>
                  

                  风格

                  div {
                  display: none;
                  }
                  
                  a:hover > div:nth-child(2) {
                  display: block;
                  background-color: RED;
                  height: 250px;
                  width: 960px;
                  }
                  

                  推荐答案

                  需要使用相邻兄弟选择器~.此外,您要显示的 div 是第三个孩子,而不是第二个(因为 <a> 是第一个).

                  You need to use the adjacent siblings selector ~. Also, the div you want to show is the third child, not the second (because the <a> is the first).

                  div {
                      display: none;
                  }
                  a:hover ~ div:nth-child(3) {
                      display: block;
                      background-color: RED;
                      height: 250px;
                      width: 960px;
                  }
                  

                  演示:http://jsfiddle.net/3eFhf/

                  这篇关于在悬停时显示特定的div?仅使用 css 和 html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 模块中)

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

                      1. <tfoot id='KH8cM'></tfoot>
                          <tbody id='KH8cM'></tbody>

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