Я использую пространственную навигацию для фокусировки элемента, как показано ниже: код
в index.html
Код: Выделить всё
window.addEventListener('load', function () {
// Initialize
SpatialNavigation.init();
// Define navigable elements (anchors and elements with "focusable" class).
SpatialNavigation.add({
selector: '.focusable',
straightOnly: true,
straightOverlapThreshold: 0.5,
rememberSource: true,
});
// Make the *currently existing* navigable elements focusable.
SpatialNavigation.makeFocusable();
// Focus the first navigable element.
SpatialNavigation.focus();
});
Код: Выделить всё
[img]{[/img]
[img]{[/img]
[img]{[/img]
[img]{[/img]
I need outline focus shifting smooth style like as a below video

Источник: https://stackoverflow.com/questions/781 ... er-element
Мобильная версия