cssmoz,css 让文字不被选中之-moz-user-select 属性介绍

点评:让文字不被选中,应该有一个css属性进行控制,结果网上查了下发现了-moz-user-select 属性介绍
他在ie下也能选中文字,但是选中其他列表,不会选中文字,原来它是在不同div中,属于不同的范围,而同事是放在同一个table中,当然会选中。
而在firefox下,文字不会被选中,查看google calender的css,原来还有-moz-user-select这个属性,很好玩!
最后采用一个了js方法,即onselectstart=function{return false;},不让页面进行选择,呵呵,这是很多网站不让复制采用的方法。
Summary
-moz-user-select is a Mozilla property extension to CSS that is used to determine whether or not an element may have its content selected.
Media: interactive
Possible uses include: prohibiting the selection of content in attempts to reduce blatant copying.
Syntax
TARGET_ELEMENT{-moz-user-select: none;}Legal Values
Value Description
inherit Inherit the value from the parent element.
none None of the content may be selected.
text Only the text within the element may be selected.
element A single element may be selected (from many).
elements Multiple elements may be selected.
all The contents must either be selected in entirety or none at all.
toggle The contents are selected "following a standard toggling content model" </pre>
</body>
</html>
-khtml-是苹果的那个浏览器的 好像现在使用-webkit-user-select: none
Tags:  cssmoz

延伸阅读

最新评论

发表评论