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

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

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

      2. CSS,改变链接中图标字体的悬停效果

        CSS, changing hover effect of icon font in a link(CSS,改变链接中图标字体的悬停效果)
        <tfoot id='mA1dY'></tfoot><legend id='mA1dY'><style id='mA1dY'><dir id='mA1dY'><q id='mA1dY'></q></dir></style></legend>

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

            <tbody id='mA1dY'></tbody>

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

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

                  本文介绍了CSS,改变链接中图标字体的悬停效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个像这样的导航元素......

                  I have a nav element like so...

                  <ul class="options-list">
                      <li><a href="#"><i class="icon icon-print"></i> Print This</a></li>
                      <li><a href="#"><i class="icon icon-envelope-alt"></i> Send This</a></li>
                      <li><a href="#"><i class="icon icon-bookmark"></i> Bookmark This</a></li>
                      <li><a href="#"><i class="icon icon-star"></i> Favourite This</a></li>
                      <li><a href="#"><i class="icon icon-heart"></i> Like This</a></li>
                  </ul>
                  

                  我正在使用 Font Awesome 来生成图标.CSS如下:

                  I am using Font Awesome to generate the icons. The CSS is as follows:

                  .options-list li a {
                    color: #888;
                    display: block;
                    border-bottom: 1px solid #e7e7e7;
                    padding-top: 7px;
                    padding-right: 0;
                    padding-bottom: 7px;}
                  
                  .options-list li:first-child a {margin: -15px 0 0 0;}
                  .options-list li:last-child a {border: none;}
                  .options-list li a:hover {color: #444;}
                  

                  显然,这让我在悬停到 #444 时更改了文本(和图标)颜色.现在我想做的是保留它,但在悬停时将图标更改为不同的颜色.(即文字变为#444,图标在悬停时变为#AE0000)

                  Obviously this gives me a change of text (and icon) colour on hover to #444. Now what I would like to do, is keep that, but have the icon change to a different colour on hover. (i.e text changes to #444, icons changes to #AE0000 on hover)

                  我不确定解决它的最佳方法.(对于 CCS/HTML 来说还是很新的,所以非常感谢任何帮助!)

                  I'm not sure of the best way to tackle it. (Still quite new to CCS/HTML so any help mucho appreciated!)

                  谢谢!

                  推荐答案

                  您想设置悬停在 a 元素内的 icon 类的颜色.

                  You want to set the color of the icon class that is inside a hovered a element.

                  .options-list li a:hover .icon {color: #ae0000;}
                  

                  这篇关于CSS,改变链接中图标字体的悬停效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 的区别?)
                  1. <i id='IgKVI'><tr id='IgKVI'><dt id='IgKVI'><q id='IgKVI'><span id='IgKVI'><b id='IgKVI'><form id='IgKVI'><ins id='IgKVI'></ins><ul id='IgKVI'></ul><sub id='IgKVI'></sub></form><legend id='IgKVI'></legend><bdo id='IgKVI'><pre id='IgKVI'><center id='IgKVI'></center></pre></bdo></b><th id='IgKVI'></th></span></q></dt></tr></i><div id='IgKVI'><tfoot id='IgKVI'></tfoot><dl id='IgKVI'><fieldset id='IgKVI'></fieldset></dl></div>

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

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

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

                              <tbody id='IgKVI'></tbody>