【发布时间】:2019-09-14 23:29:33
【问题描述】:
我希望有一个文本输入,在输入中带有一个提交按钮,并使用类似边框半径的东西使边缘变圆
我在这个问题的第二个答案中使用 css: How to add button inside input
#form {
display:flex;
flex-direction:row;
border:1px solid grey;
padding:2px;
border-radius:50px; /* this is me trying to round edges of input*/
}
#input {
flex-grow:2;
border:none;
}
但是当我添加边框半径时,按钮不再出现在输入中 我该怎么办?
【问题讨论】:
-
你的 HTML 是什么?
-
请添加你的html,没有它你的css就没有多大用处。
-
输入和提交按钮是一样的,你知道吗?它只是另一种类型(按钮 - 提交)
-
它只是一个带有输入和提交按钮的标准表单
-
您在
<form>元素上放置了border-radius,而不是在<input>元素上