<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>

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

        时间:2023-11-30

              <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>

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

                  上一篇:悬停时背景颜色的渐变按钮闪烁 下一篇:div 悬停背景颜色变化?

                  相关文章

                    1. <tfoot id='t5mwo'></tfoot>
                      <legend id='t5mwo'><style id='t5mwo'><dir id='t5mwo'><q id='t5mwo'></q></dir></style></legend>
                    2. <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>