我想让id,姓名和国家全部内联
我按here
将其包裹在<span>
中
但是我在一个新的行块中看到了它们。
<md-card-title-text>
<span class="md-headline">ID: {{voice.id}}</span>
<span class="md-subhead">Name: {{voice.name}}</span>
<span style="padding-right: 10em" class="md-subhead">Countries: {{voice.conditionFromUi.countries === null ? "None" : voice.conditionFromUi.countries}}</span>
<span class="md-subhead">User flag: {{voice.conditionFromUi.userFlag === null ? "None" : voice.conditionFromUi.userFlag}}</span>
<span class="md-subhead">From date: {{voice.conditionFromUi.fromDate === null ? "None" : voice.conditionFromUi.fromDate}}
---> To date: {{voice.conditionFromUi.toDate === null ? "None" : voice.conditionFromUi.toDate}} </span>
</md-card-title-text>
我已经尝试了这个以及购买但子标题是新的
<md-card-title-text>
<span >ID: {{voice.id}}</span>
<span >Name: {{voice.name}}</span>
<span style="padding-right: 10em" class="md-subhead">Countries: {{voice.conditionFromUi.countries === null ? "None" : voice.conditionFromUi.countries}}</span>
和
<md-card-title-text>
<span style="padding-right: 10em; display:block" class="md-headline">ID: {{voice.id}}</span>
<span class="md-subhead">Name: {{voice.name}}</span>
<span style="padding-right: 10em; display:block" class="md-subhead">Countries: {{voice.conditionFromUi.countries === null ? "None" : voice.conditionFromUi.countries}}</span>
<span class="md-subhead">User flag: {{voice.conditionFromUi.userFlag === null ? "None" : voice.conditionFromUi.userFlag}}</span>
答案 0 :(得分:0)
如果没有提供一些CSS,很难说出究竟是什么造成了这种情况,但它最有可能出现在其中一个类别中导致它的类别,可能{{ 1}}。
尝试将span元素设置为display: inline-block
md-card-title-text span {
display: inline-block !important;
}