html - 为了将图标 syde 并排放置,我需要进行哪些更改
问题描述
我花了好几个小时来看看我做错了什么,但无论我尝试什么都没有发生。所以问题来了。我的索引页面中有两个操作,我放置了图标(字体真棒库)来表示编辑和删除。而且我想并排放置图标,现在在另一行中有单独的
到目前为止,我尝试的是使数据表更小,但这对我没有帮助。
<div class="panel panel-flat">
<div class="panel-body">
<table class="table datatable-responsive datatable-patients">
<thead>
<tr class="bg-blue">
<th>
Firstname
</th>
<th>
Lastname
</th>
<th>
Contact
</th>
<th>
Email
</th>
<th>
Blood Group
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr id="tr-id-@item.patient_id">
<td>
@Html.DisplayFor(modelItem => item.patient_first_name)
</td>
<td>
@Html.DisplayFor(modelItem => item.patient_last_name)
</td>
<td>
@Html.DisplayFor(modelItem => item.patient_contact_number)
</td>
<td>
@Html.DisplayFor(modelItem => item.patient_email)
</td>
<td>
@Html.DisplayFor(modelItem => item.patient_blood_group)
</td>
<td>
<ul class="icons-list text-left">
<li class="text-primary-600"><a href="~/Patients/Edit?Id=@item.patient_id"><i class="icon-pencil7"></i></a></li>
<li class="text-danger-600"><a class="delete_pacient" href="javascript:;" data-id="@item.patient_id"><i class="icon-trash"></i></a></li>
</ul>
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
$('.datatable-patients').DataTable({
dom: 'Bfrtip',
columnDefs: [
{
responsivePriority: 1,
targets: -1
},
{
targets: [-1],
orderable: false,
searchable: false,
printable: false,
width: "120"
}
]
});
我尝试单独添加,但效果不佳。谁能告诉我这里有什么问题?我在哪里犯错了?
解决方案
试试这个 CSS:
.icons-list{
display: flex;
list-style: none; /* To remove the list bullets */
}
.icons-list li{
margin-left: 1em; /* adjust it */
}
推荐阅读
- ios - “线程 1:致命错误:索引超出范围”错误无法解决
- c++ - 有没有办法根据命令行参数定义数组大小?运行时与编译时实例化?
- postgresql - 函数中的参数导致问题
- r - 在 R 3.4.3 和 R 3.6.0 之间更改存储在 data.table 中的闭包行为
- sql-server - Speed up comparison of Integer dates in Access front end to SQL Server back end
- reactjs - react-window-infinite-loader 材质-ui 自动完成
- excel - 使用 VBA 将 Excel 3D 图表导出到图像
- powershell - 自签名证书仅限于主机?
- javascript - case 显示“预期的声明或声明”。错误
- java - 我无法弄清楚如何将 Jbutton 返回到之前调用它的方法