gpt4 book ai didi

javascript - 如何修改select中option字段的大小?

转载 作者:太空宇宙 更新时间:2023-11-04 08:10:16 26 4
gpt4 key购买 nike

在 ionic 弹出窗口中,我有一个 select html 属性,里面有 options。这是我的代码和应用于它的 CSS,我的问题是如何在 select 的整个空间上设置空白?

enter image description here

enter image description here

$scope.cat1 = ["cat1", "cat2", "cat3"];
.item-select{
max-height: 30px;
border-radius: 10px;
// width: 100%;
}

.label-police{
font-family: "Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif;
font-weight:300;
background-color:rgba(172,231,242, 0.1);
}

.top-input{
background-color:rgba(206,240,246, 0.9);
font-weight:300;
border-radius: 4px 4px 4px 4px !important;
}
<label class="label-police">Cat :</label>
<div class="spacer" style="width: 100%; height: 2px;"></div>
<label class="item item-select">
<select class="top-input"><br><option class="top-input" ng-repeat="cat in cat1">{{ cat }}</option></select></label>

最佳答案

也许可以将 width: 100%; 添加到 .top-input 样式中。另外,如果您想完全调整它,请将 .item div padding 设置为 0。

Here an approach

关于javascript - 如何修改select中option字段的大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46339702/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com