gpt4 book ai didi

html - 如何给输入边框左右小长度

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

我需要显示输入字段,我需要给边框 bottom , left 和 right 。但在这里我只想要左边和右边的一小部分边框。

enter image description here

.solid {
border-style: solid;
border-left-style: dashed;
border-top: none;
border-right-style: dashed;
}
<input class="solid">

最佳答案

您可以使用 box-shadow 来创建这种类型的边框。

input {
width: 300px;
border: none;
margin: 50px;
height: 35px;
box-shadow: 13px 13px 0px -10px #000000, -13px 13px 0px -10px #000000;
outline: none;
font-size: 22px;
background: none;
}
<input type="text">

关于html - 如何给输入边框左右小长度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40909435/

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