从所选图像中删除蓝色叠加/突出显示 [英] Remove blue overlay/highlight from selected images

查看:78
本文介绍了从所选图像中删除蓝色叠加/突出显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个带有一些动画可单击图像的Web应用程序,并且我注意到(尤其是在chrome中以及在ff中),任何轻微的意外拖动图像都会使其变为蓝色. (以表明它已被选中)jquery,css或html中是否有任何方法可以停用这种烦人的副作用,或者是否有一种方法可以使用没有这种默认行为的图像?

I'm making a web application with some animated clickable images and I notice (particularly in chrome but also in ff) that any slight accidental dragging over the image turns it blue. (to indicate it is selected) Is there any way in jquery, css or html to deactivate this annoying side effect, or perhaps is there a way to use images without having this default behaviour?

我的图像在这样的无序列表中:

My images are inside unordered lists like this:

<ul>
  <li><img src="path"/></li>
  <li><img src="path"/></li>
  <li><img src="path"/></li>
</ul>

推荐答案

我认为,为了防止用户选择跨浏览器,可以使用:

I think, to prevent user-selection cross-browser, you could use:

img {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}

JS小提琴演示.

这篇关于从所选图像中删除蓝色叠加/突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆