Html Z索引输入表

Html Z索引输入表,html,z-index,Html,Z Index,我有以下代码: s 我希望从输入表单中覆盖红色框(例如,输入表单位于红色框上方,部分隐藏在输入表单中),但是z索引不起作用。我能做什么 谢谢 我不太明白你的意思。但是您需要输入字段后面的红色框吗? 否则,以下是您的解决方案: 问候, 斯特凡请试试这个:如果我理解你 <div style="float: left; position: relative;"> <input type="text" placeholder="Search..." style="float:

我有以下代码:


s
我希望从输入表单中覆盖红色框(例如,输入表单位于红色框上方,部分隐藏在输入表单中),但是z索引不起作用。我能做什么


谢谢

我不太明白你的意思。但是您需要输入字段后面的红色框吗? 否则,以下是您的解决方案:

问候,
斯特凡

请试试这个:如果我理解你

<div style="float: left; position: relative;">
<input type="text" placeholder="Search..." style="float: left; border-radius: 3px 3px 3px 3px; padding: 2px 4px; margin-top: 6px; margin-left: 8px; border: 1px solid rgb(143, 241, 255); height: 22px; font-size: 14px; font-family: Arial; width: 200px;" name="password" id="password">
<div style="background-color: red; left: 5px; right: 9939px; top: 30px; position: absolute; width: 100px; padding: 50px">
s
</div>
</div>