如何在小型设备(<600px宽度)上显示时,x位于垂直中间位置?
<div class="row">
<div class="col-sm-12">
<section class="panel panel-default panel-slider"><div class="panel-heading">
<h1 class="panel-title" style="font-size:18px">
Test with long description in title panel bla bla<a class="align-middle more pull-right" href="https://example.com" title="" data-toggle="tooltip" data-placement="right" data-original-title="more" ><i>x</i></a>
</h1>
</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-8" style="margin-bottom: 10px;">
...
</div>
</div>
目前是:
应该是:
https://jsfiddle.net/9dtu4en1/
提前致谢!
亲切的问候 亚历
答案 0 :(得分:1)
我会在h1
上使用flexbox进行更流畅的调整,并移除align-middle
&amp;来自pull-right
的{{1}}(以避免漂浮会使其父母不考虑孩子的身高):
<强> External Fiddle to resize 强>
段:
a
h1 {
display: flex;
justify-content: space-between;
align-items: center;
}