html - 试图隐藏浏览按钮时出现奇怪的灰线

标签 html css

上下文:我有一个浏览按钮(<input type="file"/>)和一个自定义按钮。我将我的自定义按钮的点击事件链接到浏览按钮的点击事件,到目前为止它们都有效。现在我只需要隐藏输入的原始文本框。

但这是我的问题:当我试图隐藏控件时,有一条奇怪的灰色 channel 停留。我尝试了很多方法让它消失,但它似乎是一个奇怪的错误,因为它在我隐藏它之前笨拙地出现在控件上。这是我尝试隐藏之前的控件:

enter image description here

及之后:

enter image description here

到目前为止我试过: -设置 css 属性 top: -10000px, visibility: hidden, opacity: 0, width: 0px, etc

以前有没有人遇到过这个错误/问题?

最佳答案

看起来这是来自 jquery 移动 CSS:

.ui-body-a, .ui-page-theme-a .ui-body-inherit, html .ui-bar-a .ui-body-        inherit, html .ui-body-a .ui-body-inherit, html body .ui-group-theme-a .ui-body-inherit, html .ui-panel-page-container-a {
background-color: #fff;
border-color: #ddd;
color: #333;
text-shadow: 0 1px 0 #f3f3f3;
   }

边界给了你问题。

做类似的事情:

.ui-body-a, .ui-page-theme-a .ui-body-inherit, html .ui-bar-a .ui-body-inherit, html .ui-body-a .ui-body-inherit, html body .ui-group-theme-a .ui-body-inherit, html .ui-panel-page-container-a { border: none; }

这应该可以解决您的问题。

关于html - 试图隐藏浏览按钮时出现奇怪的灰线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32889831/

相关文章:

html - 本地主机 View 和实时版本中的不同网页外观

javascript - 滚动带有 overflow hidden 的 div 时粘性标题

javascript - .checked 和 .attr(checked,boolean) 之间的区别

android - HTML 网站导航菜单向后翻转

html - z-index 会影响 div 的高度吗?

javascript - 变量错误标签的正确位置 - Bootstrap/Jquery

javascript - 如何在html表格中使用分页

CSS水平滚动条不显示,或者右侧有空白

javascript - querySelectorAll 不是函数

html - 在没有 JS 的 CSS 事件后保持页面内的滚动位置?