Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何垂直居中/对齐<;旁边的文本;预处理>;标签_Html_Css - Fatal编程技术网

Html 如何垂直居中/对齐<;旁边的文本;预处理>;标签

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”保持一致


信用卡*********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
外部样式表或在线内联样式吗?