当屏幕宽度减少到一半时,Bootstrap将我的内容推送到关闭状态

时间:2017-10-21 19:41:37

标签: html5 css3 bootstrap-4

<div class="container">
    <img style="float:left" src="assets/images/logo.png" alt="university logo">
    <h1  style="float:left;color:white;padding-top:20px;text-align:center;margin-left:10%"> Welcome To SURE Model</h1>
    <a style="float:left;margin-left:27%;margin-top:40px" (click)="logout()" class="btn btn-danger btn-lg"> <span class="glyphicon glyphicon-log-out"></span> Log out </a>
</div>

这是全屏图片 enter image description here

如果我将屏幕尺寸缩小到一半就会出现这样的情况 enter image description here

那么我怎样才能做出这种反应?

1 个答案:

答案 0 :(得分:0)

你为3个标签漂浮了 img h1 a 因为它向下推动以使用bootstrap响应我建议使用类 .row 并且在其中包含 col-md col-lg 的类,用于secify paltform target