我已經安排HTML UL李標籤如下所述:如何對齊李垂直方向的中間
<html>
<head>
</head>
<body style="margin: 0px;">
<ul style="display: table; width:98%; margin: 5px; padding: 0; min-width:500px;">
<li style="display:table-row; padding: 0; margin: 0;">
<ul style="padding: 0; margin: 0;">
<li style="float:left; text-align:center; display:table-cell; width:5%; min-height: 50px; ">A</li>
<li style="float:left; display:table-cell; width:87%; min-height: 50px; ">B</li>
<li style="float:left; text-align:center; display:table-cell; width:8%; min-height: 50px; "><input type="submit" name="one" id="one" value="one"></li></ul>
</li>
<li style="display:table-row; padding: 0; margin: 0;">
<ul style="padding: 0; margin: 0;">
<li style="float:left; display:table-cell; width:92%; min-height: 100px; ">
<div style="width:100%; box-shadow: 1px 1px 1px #cfcfcf; border-radius:10px; color:black; border:1px solid #e5e5e5; min-height: 100px;">Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. SamplText here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. </div>
</li>
<li style="float:left;text-align:center; display:table-cell; width:8%; min-height: 100px; "> C</li>
</ul>
</li>
<li style="display:table-row; padding: 0; margin: 0;">
<ul style="padding: 0; margin: 0;">
<li style="float:left; text-align:center; display:table-cell; width:5%; min-height: 100px; "><input type="radio" name="optia" value="a" id="optia">A</li>
<li style="float:left; display:table-cell; width:87%; min-height: 100px; "><div style="width:100%; box-shadow: 1px 1px 1px #cfcfcf; border-radius:10px; color:black; border:1px solid #e5e5e5; min-height: 100px;">Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. Sample Text here. </div></li>
<li style="float:left; text-align:center; display:table-cell; width:8%; min-height: 100px; "> C</li>
</ul>
</li>
</ul>
</body>
</html>
它給輸出如下所述:
我怎麼能對齊單選按鈕和最後一列中的文本「C」與LI垂直居中;沿着RED線繪製?
Ug,內聯CSS。 – j08691
@ j08691;對不起,我沒有得到你?什麼是Ug? [在上面的帖子中添加了內聯CSS,以提供UI的外觀和感覺,在實際代碼中,CSS是外部的] –
Ug是我將手放在空中試圖進行調試。 – j08691