使用ionic3,当我添加一个标签时,它会在几乎所有屏幕上形成一个大阴影......我在css上找不到任何对它有任何影响的属性......
<div class="clockselect">
<label>Type:</label>
<select [(ngModel)]="alarm.type" style="font-size: 20px">
<option value="Sunday">Sunday</option>
<option value="Monday">Monday</option>
<option value="Thuesday">Thuesday</option>
<option value="Wednesday">Wednesday</option>
<option value="Thursday">Thursday</option>
<option value="Friday">Friday</option>
<option value="Saturday">Saturday</option>
<option value="Weekend">Weekend</option>
<option value="All days">All days</option>
</select>
<span class="clockZone">
<ion-select [(ngModel)]="alarm.hour">
<ion-option *ngFor="let Hour of hours">{{Hour}}</ion-option>
</ion-select>
<h3>:</h3>
<ion-select [(ngModel)]="alarm.minute">
<ion-option *ngFor="let Min of mins">{{Min}}</ion-option>
</ion-select>
</span>
</div>
的CSS:
.clockZone {
display: flex;
flex-direction: row;
align-items: center;
width: 140px;
height: 40px;
background-color: rgb(240, 246, 255);
border-radius: 6px;
ion-select {
width: 65px;
box-shadow: transparent;
align-items: center;
}
}
答案 0 :(得分:0)
在该论坛中找到答案: Ion-select triggering on whole-view..(activating on click anywhere)
我只需添加scss页面的文件:
.item-cover {
width: 0;
height: 0;
}