<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 单选按钮垂直对齐到它的标签?

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

                  上一篇:AngularJs:ng-model 未绑定到 ng-checked 输入类型 =“radio",与 ng-r 下一篇:如何设置 (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'>

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

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