第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

input和span、p、i等標簽 垂直居中

<meta charset="utf-8">

<div class="input_row">

<input type="checkbox" class="must_check">

<span class="error_point">錯誤提示</span>

</div>

<style>

.input_row {

position:relative;

height:30px;

line-height:30px;

}

.must_check {

}

.error_point {

display:inline-block;

font-size:12px;

line-height:30px;

}

</style>

<!-- 類似這樣的一個表單行。很難垂直居中。 -->

<!--

.must_check {

position:relative;

top:3px;

}

這算是個解決辦法。。但是非常不雅。。

-->

<!--

<style>

.input_row {

position:relative;

height:20px;

line-height:20px;

}

.must_check {

margin-top:5px;

}

.error_point {

display:inline-block;

font-size:12px;

vertical-align:top;

}

</style>

另外一個解決辦法。。也是很不雅。。原理是將input和span的本體高度加上margin-top的高度相同。然后給span一個vertical-align:top;

達到垂直。。缺點是很難算

-->


問。。有什么雅一點的辦法。。這些辦法都有些許惡心人

正在回答

1 回答

可以試試css3的新屬性 ? flex 布局 ? ?然后flex-direction:column;然后再align-item:center;

1 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消
手把手教你實現(xiàn)電商網(wǎng)站開發(fā)
  • 參與學(xué)習       166406    人
  • 解答問題       198    個

本課程主要介紹電商網(wǎng)站基本制作流程,掌握整站開發(fā)過程,增加經(jīng)驗

進入課程

input和span、p、i等標簽 垂直居中

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號