18910140161

html-向表的溢出点堆栈溢出添加框阴影

顺晟科技

2022-10-19 13:23:56

186

我有一个表,我想在表开始溢出的地方添加一个框阴影,在右边。 尝试向表添加框影,但不起作用。

非常感谢帮助。

我的代码:jsfiddle

我的CSS:

#res_table
  {
    border-collapse: separate;
    border-spacing: 4vw 4vh;
    font-family: 'Heebo-Light'; 
    display: block;
    overflow-x: scroll;
    white-space: nowrap;
  }
  #table_wrapper
  {
    position: absolute;

    width: 20vw; 
    height: 80vh;
    overflow-y: visible;
    justify-content:center;
    font-size: 2.5vh;
    margin-left: 10vw;
  }
  #res_table td, th
  {
    text-align: center;
    white-space: nowrap;
    border-top-width: 0px;
  }
  #res_table td > div
  {
    height: 7vh;
    line-height: 7vh;
  }
  #res_table tr
  {
    box-shadow: 0 0 2vw 0 rgba(0, 0, 0, 0.2);
  }
  .cancel_res
  {
    position: fixed;
    overflow-x: hidden;
    width: 15vw;
    margin-left: 2vw;
    font-size: 2vh;
    box-shadow: 0 0 1vw  grey;
    border-radius: 2vh;
    margin-top: 2vh;
  }
  #res_table td.cancel_res > div 
  {
    height: 3vh;
    line-height: 3vh;
    
  }

顺晟科技:

我已经解决了这个问题。 刚刚将box-shadow添加到表的父div中,它就起作用了。

我真傻……

  • TAG:
相关文章
我们已经准备好了,你呢?
2024我们与您携手共赢,为您的企业形象保驾护航