Home > Web Front-end > CSS Tutorial > CSS nav-right property

CSS nav-right property

王林
Release: 2023-09-02 21:45:12
forward
936 people have browsed it

CSS nav-right 属性

#nav-right property is used to move to the right when you press the right arrow button in the keyboard. You can try running the following code to implement the CSS nav-right property

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         button {
            position: absolute;
         }
         button#btn1 {
            top: 10%;
            left: 15%;
            nav-index: 1;
            nav-right: #btn2;
            nav-left: #btn4;
            nav-down: #btn2;
            nav-up: #btn4;
         }
         button#btn2 {
            top: 30%;
            left: 30%;
            nav-index: 2;
            nav-right: #btn3;
            nav-left: #btn1;
            nav-down: #btn3;
            nav-up: #btn1;
         }
         button#btn3 {
            top: 50%;
            left: 15%;
            nav-index: 3;
            nav-right: #btn4;
            nav-left: #btn2;
            nav-down: #btn4;
            nav-up: #btn2;
         }
         button#btn4 {
            top: 30%;
            left: 0%;
            nav-index: 4;
            nav-right: #btn1;
            nav-left: #btn3;
            nav-down: #btn1;
            nav-up: #btn3;
         }
      </style>
   </head>
   <body>
      <button id = "btn1">Result1</button>
      <button id = "btn2">Result2</button>
      <button id = "btn3">Result3</button>
      <button id = "btn4">Result4</button>
   </body>
</html>
Copy after login

The above is the detailed content of CSS nav-right property. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template