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

      <tfoot id='rfbeU'></tfoot>

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

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

        如何在悬停时将 CSS 类应用于动态生成的提交按钮?

        How to apply a CSS class on hover to dynamically generated submit buttons?(如何在悬停时将 CSS 类应用于动态生成的提交按钮?)
          <i id='crP4x'><tr id='crP4x'><dt id='crP4x'><q id='crP4x'><span id='crP4x'><b id='crP4x'><form id='crP4x'><ins id='crP4x'></ins><ul id='crP4x'></ul><sub id='crP4x'></sub></form><legend id='crP4x'></legend><bdo id='crP4x'><pre id='crP4x'><center id='crP4x'></center></pre></bdo></b><th id='crP4x'></th></span></q></dt></tr></i><div id='crP4x'><tfoot id='crP4x'></tfoot><dl id='crP4x'><fieldset id='crP4x'></fieldset></dl></div>

                <tbody id='crP4x'></tbody>
            • <legend id='crP4x'><style id='crP4x'><dir id='crP4x'><q id='crP4x'></q></dir></style></legend>
            • <small id='crP4x'></small><noframes id='crP4x'>

                <tfoot id='crP4x'></tfoot>
                  <bdo id='crP4x'></bdo><ul id='crP4x'></ul>
                  本文介绍了如何在悬停时将 CSS 类应用于动态生成的提交按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有以下 HTML/CSS 代码,用于根据从数据库中检索到的行数显示页面.

                  I have the following piece of HTML/CSS code which is used to display pages based on the number of rows retrieved from a database.

                  .paginate {
                      font-family:Arial,Helvetica,sans-serif;
                      padding:3px;
                      margin:3px;
                  }
                  
                  .disableCurrentPage {
                      font-weight:bold;
                      background-color:#999;color:#FFF; 
                      border:1px solid #999;
                      text-decoration:none;color:#FFF;
                      font-weight:bold;
                  }
                  
                  .paging {
                      cursor: pointer; 
                      background-color: transparent;border:1px solid #999;
                      text-decoration:none;
                      color:#9CC;
                      font-weight:bold;
                  }

                  <div class='paginate'>
                      <input type="submit" name="btnFirst" value="First" 
                             class="disableCurrentPage" disabled="disabled"/>
                      <input type="submit" name="btnPrev" value="Previous" class="paging"/>
                          
                      <input type="submit" name="btnPage" value="1"
                             class="disableCurrentPage" disabled="disabled"/>
                      <input type="submit" name="btnPage" value="2" class="paging"/>
                      <input type="submit" name="btnPage" value="3" class="paging"/>
                      <input type="submit" name="btnPage" value="4" class="paging"/>
                      <input type="submit" name="btnPage" value="5" class="paging"/>
                      <input type="submit" name="btnPage" value="6" class="paging"/>
                      <input type="submit" name="btnPage" value="7" class="paging"/>
                      <input type="submit" name="btnPage" value="8" class="paging"/>
                      <input type="submit" name="btnPage" value="9" class="paging"/>
                      <input type="submit" name="btnPage" value="10" class="paging"/>
                          
                      <input type="submit" name="btnNext" value="Next" class="paging"/>
                      <input type="submit" name="btnLast" value="Last" class="paging"/>
                  </div>

                  到目前为止,这是毫无疑问的.我想将类似于以下内容的 CSS 类应用于鼠标悬停时的所有这些按钮.

                  Upto this there is no question. I want to apply the CSS class something like the following to all of those buttons on mouse hover.

                  .button:hover {
                      border:1px solid #999;
                      color:#000;
                  }
                  

                  那些名称属性为 btnPage 的按钮是在循环中动态生成的.因此,我认为基于 id 属性应用前面的 CSS 类是不方便的.

                  Those buttons with the name attribute btnPage are generated dynamically in a loop. Therefore, I think it is inconvenient to apply the preceding CSS class based on the id attribute.

                  那么,如何将此类应用于悬停按钮?

                  So, how can this class be applied to those buttons on hover?

                  推荐答案

                  添加以下代码

                  input[type="submit"]:hover {
                      border: 1px solid #999;
                      color: #000;
                  }
                  

                  如果您只需要这些按钮,那么您可以添加 id 名称

                  If you need only for these button then you can add id name

                  #paginate input[type="submit"]:hover {
                      border: 1px solid #999;
                      color: #000;
                  }
                  

                  演示

                  这篇关于如何在悬停时将 CSS 类应用于动态生成的提交按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

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

                        <tbody id='gJndB'></tbody>
                          <bdo id='gJndB'></bdo><ul id='gJndB'></ul>
                        • <tfoot id='gJndB'></tfoot>

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

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