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

      • <bdo id='6vHdb'></bdo><ul id='6vHdb'></ul>

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

      <small id='6vHdb'></small><noframes id='6vHdb'>

      <tfoot id='6vHdb'></tfoot>

      1. 如何将 html 单选按钮垂直对齐到它的标签?

        How to vertically align a html radio button to it#39;s label?(如何将 html 单选按钮垂直对齐到它的标签?)
          <i id='qCUZO'><tr id='qCUZO'><dt id='qCUZO'><q id='qCUZO'><span id='qCUZO'><b id='qCUZO'><form id='qCUZO'><ins id='qCUZO'></ins><ul id='qCUZO'></ul><sub id='qCUZO'></sub></form><legend id='qCUZO'></legend><bdo id='qCUZO'><pre id='qCUZO'><center id='qCUZO'></center></pre></bdo></b><th id='qCUZO'></th></span></q></dt></tr></i><div id='qCUZO'><tfoot id='qCUZO'></tfoot><dl id='qCUZO'><fieldset id='qCUZO'></fieldset></dl></div>
          • <tfoot id='qCUZO'></tfoot>

              <tbody id='qCUZO'></tbody>

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

            <legend id='qCUZO'><style id='qCUZO'><dir id='qCUZO'><q id='qCUZO'></q></dir></style></legend>
            • <bdo id='qCUZO'></bdo><ul id='qCUZO'></ul>
                  本文介绍了如何将 html 单选按钮垂直对齐到它的标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个带有单选按钮的表单,这些单选按钮与其标签位于同一行.然而,单选按钮并未与其标签垂直对齐,如下面的屏幕截图所示.

                  I have a form with radio buttons that are on the same line as their labels. The radio buttons are however not aligned vertically with their labels as shown in the screenshot below.

                  如何将单选按钮与其标签垂直对齐?

                  How can I vertically align the radio buttons with their labels?

                  这是html代码:

                  <input checked="checked" type="radio" name="user_level" id="rd1" value="1"/>
                  <label for="rd1">radio 1</label><br/>
                  <input type="radio" name="user_level" id="rd2" value="2"/>
                  <label for="rd2">radio 2</label><br/>
                  <input type="radio" name="user_level" id="rd3" value="3"/>
                  <label for="rd3">radio 3</label><br/>
                  

                  还有css代码:

                  label{
                      padding:5px;
                      color:#222;
                      font-family:corbel,sans-serif;
                      font-size: 14px;
                      margin: 10px;
                  }
                  

                  推荐答案

                  试试这个:

                  input[type="radio"] {
                    margin-top: -1px;
                    vertical-align: middle;
                  }
                  

                  这篇关于如何将 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 自动选择特定的单选按钮?)
                  <i id='VhEYP'><tr id='VhEYP'><dt id='VhEYP'><q id='VhEYP'><span id='VhEYP'><b id='VhEYP'><form id='VhEYP'><ins id='VhEYP'></ins><ul id='VhEYP'></ul><sub id='VhEYP'></sub></form><legend id='VhEYP'></legend><bdo id='VhEYP'><pre id='VhEYP'><center id='VhEYP'></center></pre></bdo></b><th id='VhEYP'></th></span></q></dt></tr></i><div id='VhEYP'><tfoot id='VhEYP'></tfoot><dl id='VhEYP'><fieldset id='VhEYP'></fieldset></dl></div>
                  <legend id='VhEYP'><style id='VhEYP'><dir id='VhEYP'><q id='VhEYP'></q></dir></style></legend>

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

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

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