twitter-bootstrap - Bootstrap 4 table row shadow
问题描述
Is there a way to show a shadow around table rows with bootstrap 4?
I tried the following, but the shadow only appears around the outside of the table:
<table>
<TR class="shadow p-3 mb-3 bg-white rounded">
<TD>Table Cell</TD>
<TD>Table Cell</TD>
<TD>Table Cell</TD>
</TR>
<TR class="shadow p-3 mb-3 bg-white rounded">
<TD>Table Cell</TD>
<TD>Table Cell</TD>
<TD>Table Cell</TD>
</TR>
<TR class="shadow p-3 mb-3 bg-white rounded">
<TD>Table Cell</TD>
<TD>Table Cell</TD>
<TD>Table Cell</TD>
</TR>
</table>
See JSFiddle https://jsfiddle.net/na6ohL0j/
解决方案
从您的 html 中删除shadow
该类并在您的 css 中添加以下内容:
tr {
box-shadow: 0px 2px 18px 0px rgba(0,0,0,0.5);
display: block;
}
推荐阅读
- vim - 什么是vim命令复制粘贴一行'n'没有。行中的数字连续增加的次数?
- functional-programming - 从 Javascript 代码中删除 ifs
- python - python要求:如何获得相同的版本?
- java - 相机崩溃
- swift - uitableview部分折叠时单元格中的按钮不隐藏
- asp.net - .NET Core 2 MVC - 不在 HTTP 上加载,在 HTTPS 上加载
- android - 使用游标将数据从 recyclerview 传递到活动
- python - 字符串模板替换:每次出现都必须替换
- multithreading - F# MailboxProcessor 限制并行度
- java - ffmpeg权限在java上被拒绝