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

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

    2. <tfoot id='lvIzr'></tfoot>

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

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

        如何更改选择中悬停选项的背景颜色和文本?

        How to change background color and text of hover options in select?(如何更改选择中悬停选项的背景颜色和文本?)

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

              <tfoot id='ZDGvI'></tfoot>

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

              <legend id='ZDGvI'><style id='ZDGvI'><dir id='ZDGvI'><q id='ZDGvI'></q></dir></style></legend>
                <bdo id='ZDGvI'></bdo><ul id='ZDGvI'></ul>
                1. 本文介绍了如何更改选择中悬停选项的背景颜色和文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想在悬停时将此蓝色更改为透明,并将文本颜色更改为红色

                  I want to change this blue to transparent and the text color to red on hover

                  推荐答案

                  这是一个工作示例.- 单个选择选项无法设置样式.

                  Here is a working example. - A single select option cannot be styled.

                  我们在这里所做的是使用在点击时触发的 size 将选择更改为多选.转换为多选后,您可以设置选项悬停样式.

                  What we are doing here is changing the select to multiple selects using size which is triggered onclick. Once converted to a multiple select you can then style the option hover.

                  .blue:hover {background: blue;}
                  
                  .green:hover {background: green;}
                  
                  .red:hover {background: red;}

                  <select onfocus='this.size=3;' onblur='this.size=0;' 
                              onchange='this.size=1; this.blur();'>
                  <option class="blue" >blue background</option>
                  <option class="green" >green background</option>
                  <option class="red" >red background</option>
                  </select>

                  这篇关于如何更改选择中悬停选项的背景颜色和文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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. <tfoot id='t5mwo'></tfoot>
                            <tbody id='t5mwo'></tbody>
                          <legend id='t5mwo'><style id='t5mwo'><dir id='t5mwo'><q id='t5mwo'></q></dir></style></legend>
                        • <i id='t5mwo'><tr id='t5mwo'><dt id='t5mwo'><q id='t5mwo'><span id='t5mwo'><b id='t5mwo'><form id='t5mwo'><ins id='t5mwo'></ins><ul id='t5mwo'></ul><sub id='t5mwo'></sub></form><legend id='t5mwo'></legend><bdo id='t5mwo'><pre id='t5mwo'><center id='t5mwo'></center></pre></bdo></b><th id='t5mwo'></th></span></q></dt></tr></i><div id='t5mwo'><tfoot id='t5mwo'></tfoot><dl id='t5mwo'><fieldset id='t5mwo'></fieldset></dl></div>

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

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