Css 角度:在editText的滚动面板中跳转滚动条

Css 角度:在editText的滚动面板中跳转滚动条,css,angular5,scrollbar,Css,Angular5,Scrollbar,我的应用程序有可折叠面板。它包含带有EditText的滚动面板(由*ngFor生成)。我试图通过添加以下内容来实现这一点: html { overflow-y: scroll; /*not working*/ } 还有另一个解决方案,我在这里找到了,但它不起作用。 Im还使用AutosizeModule调整EditText的大小(ngx autosize) 这个问题看起来像: 组成部分: @Component({/* typical content */}) export cla

我的应用程序有可折叠面板。它包含带有EditText的滚动面板(由*ngFor生成)。我试图通过添加以下内容来实现这一点:

html {
  overflow-y: scroll; /*not working*/
}
还有另一个解决方案,我在这里找到了,但它不起作用。 Im还使用AutosizeModule调整EditText的大小(ngx autosize)

这个问题看起来像:

组成部分:

    @Component({/* typical content */})
export class AnswerDialogComponent implements OnInit {

  constructor() {
  }

  answerText: string[] = [/*string values */'];

  ngOnInit() {
  }

  trackByIndex(index: number): any {
    return index;
  }
}
MyHtml:

<div id="answerDialog">
  <h3>Answers:</h3>
  <hr>
  <nav>
    <ul>
      <li *ngFor="let i of answerText; let index =index; trackBy: trackByIndex;">
        <textarea autosize name="Text" class="input" [(ngModel)]="answerText[index]" ></textarea>
      </li>
    </ul>
  </nav>
</div>

嘿,你找到解决办法了吗?如果没有,你能创建一个plunkr或其他什么吗?我不是100%确定,但它看起来像是最近在ngx autosize中修复的东西,请检查最新版本version@chrystian我删除了ngx autosize并自己进行了缩放:)所以实际上是ngx autosize造成了问题?我能请你测试一下最新的版本吗?如果更好的话,请写在这里。@chrystian它现在可以正常工作了
#answerDialog {
  display: block;
  margin-top: -50px;
  width: 300px;
  border: 1px solid #8BC3A3;
  border-radius: 10px 0 0 10px;
  background: #fefefe;
  max-height: 595px;
  height: auto;
  position: fixed;
  right: 510px;
  z-index: 1;
  padding-bottom: 10px;
  border-right: 0;
}

hr {
  margin-top: 5px;
}

h3 {
  font-size: 20px;
  text-align: center;
  margin-bottom: 15px;
  font-family: Helvetica, Arial, sans-serif;
}

.input {
  border-radius: 5px;
  background: #f8f8f8;
  border: 1px solid rgba(0, 0, 0, 0.075);
  color: #727272;
  width: 90%;
  height: auto;
  vertical-align: middle;
  resize: none;
  outline: none;
  margin-bottom: 5px;
  margin-top: 5px;
}

.input:hover {
  border: 1px solid #8BC3A3;
}

.input:focus {
  outline: none;
  border: 1px solid #8BC3A3;
}

nav ul {
  overflow-y: auto;
  max-height: 505px;
  height: auto;
}

html {
  overflow-y: scroll; /*not working*/
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: #8BC3A3;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}