css - 删除 Surface 3 IE 上的透明浅灰色高光

标签 css twitter-bootstrap internet-explorer

我正在对通过 IE 在 Surface 3 上显示的网络应用程序进行一些更改。

以前,一切都很好,因为该应用程序是通过 Chrome 显示的。但 IT 决定改用 IE,结果“坏了”。

我正在使用 Bootstrap 。

问题是当使用旋转木马时,左/右箭头按钮在点击时会在元素上显示浅灰色“突出显示”。我相信这是一个 <a>已被设计为按钮。

我一直在使用以下方法但无济于事:

#carouselId1 a,
#carouselId1 a:hover,
#carouselId1 a:active,
#carouselId1 a:visited,
#carouselId2 a,
#carouselId2 a:hover,
#carouselId2 a:active,
#carouselId2 a:visited,
#carouselId5 a,
#carouselId5 a:hover,
#carouselId5 a:active,
#carouselId5 a:visited,
#carouselId6 a,
#carouselId6 a:hover,
#carouselId6 a:active,
#carouselId6 a:visited,
#carouselId1 a:focus {
    background-color: transparent;
    outline: none;
    -ms-user-select: none; /* IE10+ */
    -ms-tap-highlight-color: transparent;
    background-image: none !important;
    filter: none !important; 
    progid:none !important;
}

有趣的是,灰色突出显示的元素不再显示在桌面上的 IE 11 上。但保留在 Surface 3 上。

我正在使用 VisualStudio Code 和 Microsoft Document Connection 在 MacBook Pro 上进行开发。这些工具无法更改,仅供引用。

附件是我为灰色突出显示的元素拍摄的照片。

提前感谢您抽出时间。

#

更新:我注意到只有在触摸/点击时才会发生这种情况。如果我在 Surface 键盘上使用触控板,然后单击按钮,则没有突出显示。

这是 IE 的问题还是 OS 的问题?

#

enter image description here

最佳答案

我刚刚发现如何从 html 元素中去除浅灰色突出显示/选择。

触摸 Action :无;

就是这样!

在谷歌上搜索了一段时间后,我看到了这个页面: https://msdn.microsoft.com/en-us/library/jj583807(v=vs.85).aspx

它提到了 touch-action 属性。

关于css - 删除 Surface 3 IE 上的透明浅灰色高光,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37774272/

相关文章:

twitter-bootstrap - 什么是 Bootstrap ?

javascript - 水平居中对齐 File Upload 控件的 'No file chosen' 消息

JavaScript 滚动元素在 Chrome 中有效,但在 IE11 中无效

html - 如何创建旁边有 2x3 网格的侧边栏

javascript - 将 CSS 与 Express 结合使用

html - 是否可以在一个文本区域中使用多种不同的文本颜色?

vba - IE 自动化 - Excel VBA ...加载网站后遇到错误

html - 分隔 div 中的列以实现文本的左对齐(bootstrap)

javascript - jquery 在滚动上切换类

css - IFRAME:在 IE 和 Edge 中悬停无法按预期工作