• <b id="l3qpx"><abbr id="l3qpx"></abbr></b>
  • <th id="l3qpx"><progress id="l3qpx"></progress></th>
      <th id="l3qpx"></th>
      <dd id="l3qpx"><font id="l3qpx"></font></dd>
      <th id="l3qpx"></th>
      0712-2888027 189-8648-0214
      微信公眾號

      孝感風(fēng)信網(wǎng)絡(luò)科技有限公司微信公眾號

      當(dāng)前位置:主頁 > 技術(shù)支持 > HTML5/CSS3 > 如何讓input單選框中type="radio"屬性垂直居中對齊

      如何讓input單選框中type="radio"屬性垂直居中對齊

      時(shí)間:2015-10-29來源:風(fēng)信官網(wǎng) 點(diǎn)擊: 5089次
      在開發(fā)的過程中有時(shí)候遇到input標(biāo)簽中的type="radio"單選按鈕的時(shí)候,需要對單選按鈕進(jìn)行垂直居中對齊的操作,例如:性別的選擇等。

      只需要定義字體行高及高度即可實(shí)現(xiàn)。

      html代碼如下:

      <span>性別:</span>
      <input type="radio" value="男" name="sex" checked="checked" class="sex" /><label>先生</label>
      <input type="radio" value="女" name="sex" class="sex"/><label>女士</label>

      css代碼如下:  

       .sex{
          line-height: 30px;
          height: 30px;
          vertical-align: middle;
          margin-right: 3px;
      }

      顯示的效果如下截圖:

      如何讓input單選框中type="radio"屬性垂直居中對
      欄目列表
      推薦內(nèi)容
      熱點(diǎn)內(nèi)容
      展開
      欧美一区二区三区免费A级视频,亚洲精品中文字幕综合,动漫精品中文字幕无码第一页,1024亚洲国产综合 亚太影院 柯西贝尔-游戏赚网
    1. <b id="l3qpx"><abbr id="l3qpx"></abbr></b>
    2. <th id="l3qpx"><progress id="l3qpx"></progress></th>
        <th id="l3qpx"></th>
        <dd id="l3qpx"><font id="l3qpx"></font></dd>
        <th id="l3qpx"></th>