我尝试集成一个按钮来显示输入的密码,但ion-item的行底。我需要用sss隐藏该行,然后尝试隐藏
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Item</title>
<script type="module" src="https://cdn.jsdelivr.net/npm/@ionic/core@4.7.4/dist/ionic/ionic.esm.js"></script>
<script nomodule src="https://cdn.jsdelivr.net/npm/@ionic/core@4.7.4/dist/ionic/ionic.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ionic/core@4.7.4/css/ionic.bundle.css"/>
<style>
:root {
--ion-safe-area-top: 20px;
--ion-safe-area-bottom: 22px;
}
</style>
</head>
<body>
<ion-app>
<ion-content fullscreen class="ion-padding">
<ion-item class="form-login">
<!-- Input password -->
<ion-input type="password" placeholder="Password" class="text-primary"></ion-input>
<!-- Button password -->
<ion-button fill="clear" slot="end" (click)="showPassword()">
<ion-icon slot="icon-only" name="eye"></ion-icon>
</ion-button>
</ion-item>
</ion-content>
</ion-app>
</body>
</html>
答案 0 :(得分:0)
https://forum.ionicframework.com/t/how-to-remove-has-focus-line-in-ion-input/150029/5
ion-item {
--highlight-color-focused: none;
}