在其余按钮旁边制作我的拉拉维尔集体破坏按钮

  • 本文关键字:按钮 余按钮 html laravel
  • 更新时间 :
  • 英文 :


我有一个带有 3 个操作按钮的表格,我希望"销毁"按钮紧挨着其余按钮,但它被放置在其他两个按钮下,我该如何解决?

<table class="table">
<thead>
<tr>
<th class="text-center">Publishing Date</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@foreach($books as $book)
<tr>
<td class="text-center">{{$book->fec_pub}}</td>
<td class="td-actions text-center">
<a href="/books/show" type="button" class="btn btn-info">
<i class="material-icons">remove_red_eye</i>
</a>
<a href="/books/{{$book->id}}/edit" title="Edit" class="btn btn-success">
<i class="material-icons">edit</i>
</a>
{!! Form::open(['route'=> ['books.destroy', $book->id], 'method'=>'DELETE']) !!}
{!! Form::button('<i class="material-icons">close</i>', ['type' => 'submit','class' => 'btn btn-danger']) !!}
{!! Form::close() !!}
</td>
</tr>
@endforeach
</tbody>
</table>

{!! Form::open生成的<form>的默认显示为block。您需要将display: inline-block样式添加到窗体中,以便按钮位于其他按钮旁边。

这也可以通过d-inline-blockBootstrap 4类来完成。

最新更新