spatial-navigation-polyfill
Version:
A polyfill for the spatial navigation
27 lines (25 loc) • 1.39 kB
HTML
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="application-name" content="Scrollable region">
<meta name="author" content="Jihye Hong">
<meta name="description" content="<b>The scrollable region is considered as a container</b> that can give priority to the internal elements in spatial navigation. You can test spatial navigation behavior in the scrollable regions using arrow keys.">
<link rel="stylesheet" href="spatnav-style.css">
<script src="spatnav-utils.js"></script>
<script src="../../polyfill/spatial-navigation-polyfill.js"></script>
</head>
<body>
<div class="container c1" id='scroller' tabindex="0" style="overflow-y: scroll;">
<div tabindex="0" class="box b2" style="left: 70px; top: 30px"></div>
<div tabindex="0" id="target" class="box b2" style="left: 50px; top: 90px"></div>
<div tabindex="0" class="box b2" style="left: 130px; top: 267px"></div>
<div tabindex="0" class="box b2" style="left: 140px; top: 330px"></div>
<div tabindex="0" class="box b2" style="left: 50px; top: 360px"></div>
</div>
<div tabindex="0" class="box b1" style="left: 130px; top: 20px;"></div>
<div tabindex="0" class="box b1" style="left: 80px; top: -80px;"></div>
<div tabindex="0" class="box b1" style="left: 20px; top: -120px;"></div>
</body>
</html>