HTML 表单输入文本未显示

标签 html css forms text

我的页面没有显示来 self 的表单的输入文本。每当我选择文本框时,它都会发光但不接受文本。

我知道我的 CSS 有问题,但我似乎无法找出问题所在。

HTML:

<div class="container" id="signin">
    <h2>Sign in</h2>
    <form method="post" action="index.html">
        <!-- <input style="display:none" type="password" name="fakepasswordremembered"/> -->
        <input type="text" name="password" placeholder="Password" >
        <br />
        <input class="button" type="submit" name="commit" value="Login" />
    </form>
</div>

CSS:

a {
    text-decoration: none;
    position: absolute;
    right: 0;
    text-align: right;
    color: #fff;
}
a:hover {
    text-decoration: underline;
}

.container {
    position: fixed;
    top: 50%;
    left: 50%;

    width: 55%;
    padding: 30px 0;

    transform: translate(-50%, -50%);
    text-align: center;

    color: #fff;
    background: rgba(0,0,0,0.3);
}

#signin, #close {
    display: none;
}

#signin {
    width: 35%;
}

最佳答案

您已将 display : none 添加到 signin id。让它成为 display : block 或将其删除。此外,对于密码字段,可以使用input type="password"

关于HTML 表单输入文本未显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35259683/

相关文章:

php - 使用按钮控制 mysql 数组

html - 使iframe默认图片与空白iframe大小相同

javascript - 根据调整大小的方向显示不同的图像

css - 更改字体大小和行高 wordpress

jquery - 位置 :absolute container hiding position:relative child

php - 如何在邮件函数的消息正文中打印复选框数组

html - Servlet返回“HTTP状态404请求的资源(/Servlet)不可用”

javascript - 如何打印与显示完全相同的 Bootstrap 模态?

javascript - 尝试将 CSS 与 ExtractTextPlugin 捆绑在一起

javascript - 使用 jQuery 提交表单(json 编码、ajax、解析原始 url/方法)