cross browser - How to disable text selection highlighting using CSS? -
For the anchors that act as buttons (for example, question , Tag , user , etc. & nbsp; overflow page at the top of the heap) or tab, is there a CSS standard way to disable the highlighting effect if the user selects abrupt text is?
I realize that this can be done with Javascript, and a small googling has received the Mozilla-only -moz-user-select option.
Is there a standard-compliance method to complete it with CSS, and if not, what is the "best practice" approach?
according to January, 2017:
Accordingly,
All correct CSS variations are:
.noselect {-webkit- touch-callout: none; / * IOS Safari * / -webkit-user-select: none; / * Safari * / -khtml - Select User: None; / * Conquer HTML * / -moz-user-select: none; / * Choose Firefox * / -MMS-User: None; / * Internet Explorer / Age * / User-select: None; / * Non-prefix version, which is currently supported by Chrome and Opera * /} & lt ; P & gt; Selectable text & lt; / P & gt; & Lt; P class = "noselect" & gt; Non-selective text & lt; / P & gt; Note More information can be found.
Comments
Post a Comment