Jquey 修改 元素 CSS 样式

Posted csdqxhaaa

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Jquey 修改 元素 CSS 样式相关的知识,希望对你有一定的参考价值。

test() {
        console.log(\'running......\')
        console.log($(\'.el-table__header-wrapper tr>th:first\'))
        $(\'.el-table__header-wrapper tr>th:first\').css({\'position\':\'sticky\', \'left\':0, \'z-index\': 999})
        console.log($(\'.el-table__header-wrapper tr>th:first>div:first\'))
        $(\'.el-table__header-wrapper tr>th:first>div:first\').css(\'visibility\', \'visible\')
        console.log($(\'.el-table__header-wrapper tr:eq(1)>th:first\'))
        $(\'.el-table__header-wrapper tr:eq(1)>th:first\').css({\'position\':\'sticky\', \'left\':0, \'z-index\': 999})
        this.$forceUpdate()
        console.log(\'ending.......\')
      }

  

this.$nextTick(()=>{
  // 下面三个会导致左侧固定的列异常
  $(\'.el-card__body\').css(\'overflow\',\'visible\')
  $(\'.el-card\').css(\'overflow\',\'visible\')
  $(\'.el-tabs__content\').css(\'overflow\',\'visible\')
  // el-table__fixed
  // $(\'.el-table__fixed\').css(\'z-index\',\'800\')
  // 将第一行、第一列单元格中的文字显示出来

})

  

以上是关于Jquey 修改 元素 CSS 样式的主要内容,如果未能解决你的问题,请参考以下文章