【发布时间】:2020-07-07 18:57:44
【问题描述】:
我在这里有这张卡片 我希望我的按钮也可以单独显示并且垂直对齐并且也可以向右拉。我怎样才能做到这一点?她是演示卡
这是我的代码
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="body">
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="card main-content">
<div class="body">
<div class="row clearfix">
<div class="col-sm-12">
<img id="studentimg" name="studentimg" alt="User Pic" src="/assets/images/student-avatar.png" align="left" width="150" height="150">
<p>{{studentDetail.firstName}} {{studentDetail.lastName}}</p>
<span class="pull-right" style="display: inline-block">
<button href="#" class="btn btn-primary pull-right" (click)="editStudent(studentDetail.studentKey)"> <span class="glyphicon glyphicon-pencil"></span>Edit</button>
<button href="#" class="btn btn-danger pull-right"><span class="glyphicon glyphicon-trash"></span>Delete</button>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
【问题讨论】:
-
你在sn-p中使用了
row这个类,你可以再次使用它 -
请将您的代码添加到sn-p中,所以有人很快解决了您的问题。
-
CSS 在哪里?
-
@rob 按钮与您提供的链接中的上述演示中的按钮不对齐
标签: html css twitter-bootstrap-3