gpt4 book ai didi

html - 使 HTML 输入数字上的向下箭头更大更清晰

转载 作者:太空狗 更新时间:2023-10-29 13:26:39 24 4
gpt4 key购买 nike

而不是 Is it possible to always show up/down arrows for input "number"? , 我希望能够使向上/向下箭头更大更干净。

我现在拥有的:

我需要像这样把它们变大:

最佳答案

您可以将输入包装在元素中并设置样式

div {
display: inline-block;
position: Relative;
border: 2px solid grey;
border-radius: 10px;
overflow: hidden;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
div:before,
div:after {
background: white;
right: 0px;
width: 30px;
height: 20%;
position: absolute;
pointer-events: none;
}
div:before {
content: '';
bottom: 50%;
background: url(http://cdn.flaticon.com/png/256/22205.png) no-repeat white;
background-size: 20px;
background-position: center;
}
div:after {
content: '';
top: 50%;
background: url(http://cdn.flaticon.com/png/256/22205.png) no-repeat white;
background-size: 20px;
transform: rotate(180deg);
background-position: center;
}
input {
height: 80PX;
font-size: 50px;
outline: 0;
border: 0;
}
<div>
<input type="number" value="10" />
</div>

关于html - 使 HTML 输入数字上的向下箭头更大更清晰,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29598247/

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