<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 单选按钮垂直对齐到它的标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 窗口)
                  Attach or embed node add form with a view(使用视图附加或嵌入节点添加表单)
                  @fontface in IE7 (IETEster) not working properly(IE7 (IETEster) 中的@fontface 无法正常工作)
                  Safari 5.1 breaks CSS table cell spacing(Safari 5.1 打破 CSS 表格单元格间距)
                  <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>