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

  • <tfoot id='xyyZR'></tfoot>

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

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

        如何制作具有大目标区域的 HTML 单选按钮?

        How can I make an HTML radiobutton with a big target area?(如何制作具有大目标区域的 HTML 单选按钮?)
          <bdo id='YKid7'></bdo><ul id='YKid7'></ul>
          <i id='YKid7'><tr id='YKid7'><dt id='YKid7'><q id='YKid7'><span id='YKid7'><b id='YKid7'><form id='YKid7'><ins id='YKid7'></ins><ul id='YKid7'></ul><sub id='YKid7'></sub></form><legend id='YKid7'></legend><bdo id='YKid7'><pre id='YKid7'><center id='YKid7'></center></pre></bdo></b><th id='YKid7'></th></span></q></dt></tr></i><div id='YKid7'><tfoot id='YKid7'></tfoot><dl id='YKid7'><fieldset id='YKid7'></fieldset></dl></div>

          <tfoot id='YKid7'></tfoot>
            <tbody id='YKid7'></tbody>

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

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

                1. 本文介绍了如何制作具有大目标区域的 HTML 单选按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  类似这样的:

                  用户点击按钮的任何区域并选择该单选按钮.

                  Where the user would click on any area of the button and it would select that radio button.

                  有什么建议吗?

                  据我所知,单选按钮是自关闭的,不能环绕其他元素.

                  As far as I can tell, radio buttons as self closed, and can't wrap around other elements.

                  推荐答案

                  最好的办法是把 <input> 包裹在它的 <label> 中,因为单击标签也具有聚焦其相关输入的效果:

                  The best way is to just wrap the <input> in its <label>, as clicking a label also has the effect of focusing its associated input:

                  <label>
                      <input name="transfer" type="radio">Bank Deposit
                  </label>
                  

                  无需 javascript:演示:http://jsfiddle.net/GTGan/

                  No javascript required: Demo: http://jsfiddle.net/GTGan/

                  如果您需要单独设置标签文本的样式,只需将其包装在 <span> 中即可.

                  If you need to style the label text separately, just wrap it in a <span>.

                  这篇关于如何制作具有大目标区域的 HTML 单选按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  keeping radio buttons checked after form submit(表单提交后保持选中单选按钮)
                  Styling radio button - not work in IE and Firefox(样式单选按钮 - 在 IE 和 Firefox 中不起作用)
                  Bootstrap radio button quot;checkedquot; flag(Bootstrap 单选按钮“已选中旗帜)
                  Toggle HTML radio button by clicking its label(通过单击标签来切换 HTML 单选按钮)
                  Javascript how to change radio button label text?(Javascript如何更改单选按钮标签文本?)
                  How can I automatically select specific radio buttons with Greasemonkey?(如何使用 Greasemonkey 自动选择特定的单选按钮?)
                    <tbody id='GKLSn'></tbody>

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

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

                            <bdo id='GKLSn'></bdo><ul id='GKLSn'></ul>
                          • <legend id='GKLSn'><style id='GKLSn'><dir id='GKLSn'><q id='GKLSn'></q></dir></style></legend>

                          • <tfoot id='GKLSn'></tfoot>