您好,欢迎访问一九零五行业门户网

css nav-index属性怎么用

css nav-index属性用于规定元素的连续导航次序 (tabbing order),nav-index属性的语法是nav-index: auto|number|inherit。
css nav-index属性怎么用?
定义和用法
nav-index 属性规定元素的连续导航次序 (tabbing order)。
默认值: auto
继承性: no
版本: css3
javascript 语法:
object.style.navindex=2
css3语法
nav-index: auto|number|inherit;
属性值
auto 由浏览器分配元素的导航键控制次序。
number 指示元素的导航键控制次序。1 代表第一个。
inherit 规定应从父元素继承 nav-index 属性的值。
实例
规定在使用方向键时向何处导航:
button#b1{top:20%;left:25%;nav-index:1;nav-right:#b2;nav-left:#b4;nav-down:#b2;nav-up:#b4;}button#b2{top:40%;left:50%;nav-index:2;nav-right:#b3;nav-left:#b1;nav-down:#b3;nav-up:#b1;}button#b3{top:70%;left:25%;nav-index:3;nav-right:#b4;nav-left:#b2;nav-down:#b4;nav-up:#b2;}button#b4{top:40%;left:0%;nav-index:4;nav-right:#b1;nav-left:#b3;nav-down:#b1;nav-up:#b3;}
效果输出:
浏览器支持:目前只有 opera 支持 nav-index 属性。
以上就是css nav-index属性怎么用的详细内容。
其它类似信息

推荐信息