【问题标题】:How to theme the scrollbar in xtermjs?如何为 xtermjs 中的滚动条设置主题?
【发布时间】:2020-09-06 05:19:50
【问题描述】:

如何为 xtermjs 中的滚动条设置主题?我看到了背景和前景的主题选项,但与滚动条无关。

【问题讨论】:

    标签: xtermjs


    【解决方案1】:

    如果有人在看,这是我在 xterm.css addind --webkit 到视口选择器上的解决方案

    .xterm .xterm-viewport {
      /* On OS X this is required in order for the scroll bar to appear fully opaque */
      background-color: transparent;
      overflow-y: scroll;
      cursor: default;
      position: absolute;
      right: 0;
      left: 0;
      top: 0;
      bottom: 0;
      scrollbar-color: var(--highlight) var(--dark);
      scrollbar-width: thin;
    }
    
    .xterm-viewport::-webkit-scrollbar {
      background-color: var(--dark);
      width: 5px;
    }
    
    .xterm-viewport::-webkit-scrollbar-thumb {
      background: var(--highlight);
    }
    

    【讨论】:

      猜你喜欢
      • 2016-04-28
      • 1970-01-01
      • 1970-01-01
      • 2012-01-18
      • 2016-05-01
      • 2013-10-16
      • 1970-01-01
      • 2019-06-04
      • 1970-01-01
      相关资源
      最近更新 更多