<tfoot id='jRIwe'></tfoot>

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

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

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

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

      1. 悬停时将链接图像向上移动 5px

        Move link image 5px up on hover(悬停时将链接图像向上移动 5px)

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

          <tfoot id='jLomw'></tfoot>
              <bdo id='jLomw'></bdo><ul id='jLomw'></ul>

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

            • <i id='jLomw'><tr id='jLomw'><dt id='jLomw'><q id='jLomw'><span id='jLomw'><b id='jLomw'><form id='jLomw'><ins id='jLomw'></ins><ul id='jLomw'></ul><sub id='jLomw'></sub></form><legend id='jLomw'></legend><bdo id='jLomw'><pre id='jLomw'><center id='jLomw'></center></pre></bdo></b><th id='jLomw'></th></span></q></dt></tr></i><div id='jLomw'><tfoot id='jLomw'></tfoot><dl id='jLomw'><fieldset id='jLomw'></fieldset></dl></div>
                <tbody id='jLomw'></tbody>
                • 本文介绍了悬停时将链接图像向上移动 5px的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我将如何使用 CSS 和 HTML 来实现类似于本网站的作品集页面 Solid Giant 上的效果?

                  How would I go about acheiving an effect similar to that on this site's portfolio page Solid Giant, with CSS and HTML?

                  我原以为只要放这样的东西就可以了:

                  I had thought that just putting something like this would work:

                  a img{
                      margin-top: 5px;
                  }
                  
                  a img:hover{
                      margin-top: 0px;
                  }
                  

                  但它不起作用,即使我将 :hover 放在链接上而不是 img 上.我搜索了他的代码和css,但我一生都无法弄清楚这一点.请帮忙:)

                  But it did not work, even if I put the :hover on the link instead of the img. I scoured his code and css but I could not for the life of me figure this out. Help please :)

                  推荐答案

                  position: relative 可以:

                  a img:hover{ position: relative; 
                               top: -5px;} 
                  

                  请注意,position: relative 保留文档流中的空间,就好像元素没有被 移动一样.但我认为在这种情况下,这不是问题.

                  note that position: relative reserves the space in the document flow as if the element were not moved. But I think in this case, that is not an issue.

                  这篇关于悬停时将链接图像向上移动 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 的区别?)
                  div hover background-color change?(div 悬停背景颜色变化?)

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

                      • <legend id='qDMqb'><style id='qDMqb'><dir id='qDMqb'><q id='qDMqb'></q></dir></style></legend>

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

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