다음은 CSS를 사용하여 이동 경로 탐색을 만드는 코드입니다 -
예시
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <style> body { margin: 0px; margin-top: 10px; padding: 0px; } .breadcrumb { background-color: rgb(39, 39, 39); overflow: auto; height: auto; } li { display: inline-block; text-align: center; padding: 10px; font-size: 17px; } .links { text-decoration: none; color: rgb(178, 137, 253); } .links:hover { text-decoration: underline; } .breadcrumb ul li:before { padding: 8px; color: white; content: "/\00a0"; text-decoration: none; } ul:last-child { color: white; font-weight: bolder; font-family: monospace; } </style> </head> <body> <h1>Breadcrumb Navigation Example</h1> <div class="breadcrumb"> <ul> <li><a class="links" href="#">Root</a></li> <li><a class="links" href="#">Home</a></li> <li><a class="links" href="#">User</a></li> <li><a class="links" href="#">Desktop</a></li> <li>Games</li> </ul> </div> <h2>Hover over the links to see effect</h2> </body> </html>
출력
위의 코드는 다음과 같은 출력을 생성합니다 -