Html 如何垂直居中/对齐<;旁边的文本;预处理>;标签
我试图垂直居中的“信用卡”文本旁边的预先格式化的信用卡号。我怎样才能使“信用卡”文本与“***********0000”保持一致Html 如何垂直居中/对齐<;旁边的文本;预处理>;标签,html,css,Html,Css,我试图垂直居中的“信用卡”文本旁边的预先格式化的信用卡号。我怎样才能使“信用卡”文本与“***********0000”保持一致 信用卡*********0000 这就产生了: 查看以下内容: <html> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div class="form-group">
信用卡*********0000
这就产生了:
查看以下内容:
<html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="form-group">
<input type="radio" checked></label>
<label class="radio-inline">
Credit Card <pre style="margin-left: 8px; display: inline-block; vertical-align: middle; padding: 5px; background-color: #f5f5f5; border: 1px solid #ccc; border-radius: 4px;">**** **** **** 0000</pre>
</label>
</div>
</body>
</html>
信用卡*********0000
查看以下内容:
<html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="form-group">
<input type="radio" checked></label>
<label class="radio-inline">
Credit Card <pre style="margin-left: 8px; display: inline-block; vertical-align: middle; padding: 5px; background-color: #f5f5f5; border: 1px solid #ccc; border-radius: 4px;">**** **** **** 0000</pre>
</label>
</div>
</body>
</html>
信用卡*********0000
您只需删除浮点:右
并添加显示:内联
您只需删除浮点:右
并添加显示:内联
您可以查看以下内容:
<div class="form-group" align="center" >
<input type="radio" checked>
<label>
Credit Card <pre style="margin-left: 8px; display: inline; padding: 5px; background-color: #f5f5f5; border: 1px solid #ccc; border-radius: 4px;">**** **** **** 0000</pre>
</label>
</div>
信用卡*********0000
您可以查看以下内容:
<div class="form-group" align="center" >
<input type="radio" checked>
<label>
Credit Card <pre style="margin-left: 8px; display: inline; padding: 5px; background-color: #f5f5f5; border: 1px solid #ccc; border-radius: 4px;">**** **** **** 0000</pre>
</label>
</div>
信用卡*********0000
您可以使用CSS
外部样式表或在线内联样式吗?您可以使用CSS
外部样式表或在线内联样式吗?