How Can I Make HTML Elements Unhighlightable?
This question already has an answer here:
有没有办法让文本在HTML页面上无法选择?
First of all if I would like to know the intention behind this. If this is to prevent the user from copying your text and images then I think its impossible for you to make this happen. Once it is rendered to the client browser area then the whole thing comes under the control of the user.
For images not to be highlighted make them as background.
You can also place a transparent div on top of the area where you don't want the selection to occur. Position the div so that they will appear on top of the element with a higher stacking order. For a greater stacking order you can use the z-index property.
链接地址: http://www.djcxy.com/p/7120.html上一篇: 如何在DIV中禁用突出显示(选择)文本
下一篇: 我如何使HTML元素不易察觉?