css3 nav-right属性是一个CSS3属性,用于指定当使用箭头向右的导航键时,向何处进行导航,其语法是“nav-right: auto|id|target-name;”,参数“auto”表示浏览器决定导航到哪个元素。

nav-right属性是一个CSS3属性,用于指定当使用箭头向右的导航键时,向何处进行导航。
推荐:《css3视频教程》
CSS3 nav-right属性
作用:nav-right 属性规定当使用 nav-right 导航键时,向何处进行导航。
立即学习“前端免费学习笔记(深入)”;
基本语法:
nav-right: auto|id|target-name;
auto:浏览器决定导航到哪个元素。
id:指定导航到该元素的ID
target-name :指定导航到目标帧
注:目前只有Opera 支持 nav-right 属性。
CSS3 nav-right属性的使用示例
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>php中文网(php.cn)</title>
<style>
button
{
position:absolute;
}
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;
}
</style>
</head>
<body>
<button id="b1">按钮1</button>
<button id="b2">按钮2</button>
<button id="b3">按钮3</button>
<button id="b4">按钮4</button>
<p><b>注释:</b>目前只有 Opera 支持 nav-* 属性。当您使用方向键导航时,请同时按下 Shift 键。</p>
</body>
</html>以上就是本篇文章的全部内容,希望能对大家的学习有所帮助。
以上就是css3 nav-right属性怎么用?的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号