首页 > 解决方案 > 如何从 textarea 中的文本输入中删除下划线?

问题描述

我在 textarea 中使用不同类型的字体。但是当我开始输入(在android中)时,我输入的文本带有下划线,直到我点击空格,然后下一个单词再次带有下划线,依此类推。这个下划线怎么去掉?我试过text-decoration: none;但它不起作用。

HTML

<ion-row class="text-row ion-justify-content-center">
    <ion-textarea #textBlock id="textId" (ionBlur)="focusText()" [(ngModel)]="textBlockData.text" rows="1" maxRows="15"
      style="
        font-size: {{ textBlockData.fontSize }}px;
        font-family: {{ textBlockData.fontFamily }};
        color: {{ textBlockData.color }};" class="text-input" (resized)="onResized($event)"
      placeholder="Write something" autosize>
    </ion-textarea>
</ion-row>

SCSS

@font-face {
  font-family: Pacifico;
  src: url("../../../../assets/fonts/Pacifico-Regular.ttf");
}

@font-face {
  font-family: Roboto;
  src: url("../../../../assets/fonts/Roboto-Medium.ttf");
}

.text-input {
  border-radius: 20px;
  position: absolute;
  background: transparent;
  color: white;
  max-height: 500px;
  white-space: break-spaces;
  text-decoration: none;
}

标签: htmlcssangularionic-framework

解决方案


好的,它是 android 键盘中的拼写检查器。将其关闭会删除该行。我从这里得到了答案


推荐阅读