html - Stop user-selection in Bootstrap navbar -
i prevent user-selection possible on boostrap navbar
, such :
http://getbootstrap.com/examples/navbar-fixed-top/
how stop user-selection ?
i tried user-select: none;
fails if ctrl-a.
note : don't want stop user copy text on page, want provide better user experience avoiding selection of navbar elements.
you this:
bootply - demo
.navbar { -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; }
more info:
solution 2: disable user selection when press ctrl+a
you set ::selection
background color none
bootply - demo
div.navbar *::-moz-selection { background: none !important; } div.navbar *::selection { background: none !important; } .navbar { -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; }
Comments
Post a Comment