Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 从角材质中的“垫形状”字段隐藏箭头_Html_Css_Angular_Angular Material 6 - Fatal编程技术网

Html 从角材质中的“垫形状”字段隐藏箭头

Html 从角材质中的“垫形状”字段隐藏箭头,html,css,angular,angular-material-6,Html,Css,Angular,Angular Material 6,我正在使用mat表单字段输入电话号码。这是我的基本代码 <mat-form-field class="full-width"> <input matInput type="number" placeholder="Telefonnummer für Rückruf" value="" [(ngModel)]="this.inputValues.phone"> </

我正在使用
mat表单字段
输入电话号码。这是我的基本代码

<mat-form-field class="full-width">
  <input matInput type="number" placeholder="Telefonnummer für Rückruf" value="" [(ngModel)]="this.inputValues.phone">
</mat-form-field>

顺便说一下,当我将鼠标悬停在这个组件上时,它会显示箭头/旋转按钮

请让我知道如何自定义此组件,使其不再显示箭头/旋转按钮

亲切问候,,
Jie

每当输入类型为
number
时,就会出现箭头/微调器。它可以使用css/scss删除。这提供了示例和进一步的信息

请尝试以下css/scss代码:

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

将以下CSS代码添加到
style.CSS
中时,应该将其隐藏

/* Chrome, Safari, Edge, Opera */
input[matinput]::-webkit-outer-spin-button,
input[matinput]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[matinput][type=number] {
  -moz-appearance: textfield;
}

它在我这边正常工作。谢谢你@Sai Vasmsi