gpt4 book ai didi

html - 我想把我的按钮移到那条线的中心?

转载 作者:行者123 更新时间:2023-11-28 03:57:46 25 4
gpt4 key购买 nike

<div class="fileUpload btn btn-primary" >
<span>Upload Shows</span>
<input type="file" class="upload" />
</div>

这是我的按钮字段的 div,下面是 css 脚本

.fileUpload {
position: relative;
overflow: hidden;
margin: 10px;
}
.fileUpload input.upload {
position: absolute;
top: 0;
right: 0;
margin: 0;
padding: 0;
align:center;
font-size: 20px;
cursor: pointer;
opacity: 0;
filter: alpha(opacity=0);
}

我想将我的按钮移动到当前它出现在页面左侧的那条线的中心

最佳答案

.fileUpload 中使用 text-align: center。所以你可以试试下面的代码:

.fileUpload {
position: relative;
overflow: hidden;
margin: 10px;
line-height: 25px;
text-align: center;
}
.fileUpload input.upload {
position: absolute;
margin: 0;
padding: 0;
text-align:center;
font-size: 14px;
cursor: pointer;
filter: alpha(opacity=0);
}

关于html - 我想把我的按钮移到那条线的中心?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43361390/

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