Oracle Apex 交互式报表 - 单元格背景色
Oracle Apex Interactive Report - cell background color
是否可以删除单元格内的白色 space(填充)?
像这样查询return单元格背景颜色:
Select
'<span style="background-color: #B8817D">' || col_1 || '</span>' as "1",
'<span style="background-color: #B8817D">' || col_2 || '</span>' as "2",
'<span style="background-color: #F7DC6F">' || col_3 || '</span>' as "3",
'<span style="background-color: #F7DC6F">' || col_4 || '</span>' as "4"
.....
它需要一些技巧,但应该可以。
首先内联添加此页面级别CSS:
.no-parent-padding {
padding: 8px;
margin: -12px -12px;
}
.yellow-background {
background-clip: content-box;
box-shadow: inset 0 0 0 12px yellow;
background-color: yellow;
}
.brown-background {
background-clip: content-box;
box-shadow: inset 0 0 0 12px brown;
background-color: brown;
}
接下来 SELECT 应该如下所示:
select
'<div class="brown-background no-parent-padding">'|| 12 ||'</div>' AS "12",
'<div class="yellow-background no-parent-padding">'|| 2 ||'</div>' AS "2"
....
最后结果:
是否可以删除单元格内的白色 space(填充)?
像这样查询return单元格背景颜色:
Select
'<span style="background-color: #B8817D">' || col_1 || '</span>' as "1",
'<span style="background-color: #B8817D">' || col_2 || '</span>' as "2",
'<span style="background-color: #F7DC6F">' || col_3 || '</span>' as "3",
'<span style="background-color: #F7DC6F">' || col_4 || '</span>' as "4"
.....
它需要一些技巧,但应该可以。
首先内联添加此页面级别CSS:
.no-parent-padding {
padding: 8px;
margin: -12px -12px;
}
.yellow-background {
background-clip: content-box;
box-shadow: inset 0 0 0 12px yellow;
background-color: yellow;
}
.brown-background {
background-clip: content-box;
box-shadow: inset 0 0 0 12px brown;
background-color: brown;
}
接下来 SELECT 应该如下所示:
select
'<div class="brown-background no-parent-padding">'|| 12 ||'</div>' AS "12",
'<div class="yellow-background no-parent-padding">'|| 2 ||'</div>' AS "2"
....
最后结果: