Как сделать контейнер div недоступным для выбора, используя css2 / js / html

0

Я попробовал ::selection, -moz, -webkit, -o, node.setAttribute("unselectable", "on"), но ничего не ::selection, -moz, -webkit, -o, node.setAttribute("unselectable", "on"). У кого-нибудь есть идеи об этом?

Теги:

1 ответ

0

вы можете попытаться использовать user-select:none; с префиксом: http://css-tricks.com/almanac/properties/u/user-select/

element {
  -webkit-user-select: none;  /* Chrome all / Safari all */
  -moz-user-select: none;     /* Firefox all */
  -ms-user-select: none;      /* IE 10+ */
  -o-user-select: none;       /* Opera */
  user-select: none;          /* regular */
}

тестовая страница: http://codepen.io/gc-nomade/pen/owGfz

Ещё вопросы

Сообщество Overcoder
Наверх
Меню