我尝试创建包含用户名和密码的登录页面,但我想要四舍五入的分组输入(用户名和密码)。我试过这个:
border: none;
border-color: transparent;
使用 css,但仍然有边框出现可能是错误的。
最佳答案
解决方案1
工作示例:http://jsfiddle.net/Gajotres/95Paz/
使用的 CSS:
.ui-input-text {
border: none !important;
border-color: transparent !important;
}
解决方案2
工作示例:http://jsfiddle.net/Gajotres/95Paz/1/
HTML
<div id="wrapper">
<input type="text" style="border:none" autocorrect="off" autocapitalize="off" name="username" id="username" placeholder="Username or Email" />
<input type="password" style='border-radius:5px;' id="password" placeholder="Password" />
</div>
CSS
#wrapper .ui-input-text {
border: none;
border-color: transparent;
}
更多信息
使用 jQuery Mobile 时,您需要了解最终的 HTML 内容得到了增强,并且看起来不像以前的内容。此外,当覆盖类时 !important 必须使用。阅读更多相关信息 here 。
关于css - 透明无边框文本输入,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/19047177/