I'm using spatialNavigation for focusing the element as below code
in 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