https://jsfiddle.net/p3qwz4xu/
我该如何解决。我希望整个电话号码都在同一行。
输出
Call 1234 456
789
所需的输出
Call 1234 456 789
HTML不会更改。
.call {
margin-left: 3%;
font-size: 1.5em;
}
.phone {
font-size: 2em;
}
<script type="text/javascript" src="//code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<link rel="stylesheet" type="text/css" href="//stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
<script type="text/javascript" src="//stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="container">
<div class="row">
<div class="test">
<span class="call">Call</span>
<span class="phone">1234 456 789</span>
</div>
</div>
</div>