-1

正如标题所说,我有一个指向不同路径的导航栏。将鼠标悬停在上面时,chrome 会显示正确的路径。 点击

但是当我点击按钮时,它指向 C:/index.html 我真的不明白为什么。HTML

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Scripi Andrei | Front End Developer with a passion for coding and designing to make internet a better place.</title>
    <meta name="description" content="Front End Developer with a passion for coding and designing to make internet a better place.">
    <meta name="robots" content="noodp, index, follow">
    <meta name="keywords" content="web developer, webdev, webdevelopment, web developer portfolio">
    <meta property="og:locale" content="en_US">
    <meta property="og:type" content="website">
    <meta property="og:title" content="Scripi Andrei | Romanian Front End Developer">
    <meta property="og:description" content="Front End Developer with a passion for coding and designing to make internet a better place.">
    <link href="css/normalize.css" rel="stylesheet" />
    <link href="css/font-awesome.min.css" rel="stylesheet" />
    <link href="css/fonts.min.css" rel="stylesheet" />
    <link href="css/main.css" rel="stylesheet" />
    <link href="https://fonts.googleapis.com/css?family=Roboto+Condensed:700" rel="stylesheet">
    </head>
<body>
    <div id="use-portrait">
        <h6>To use this website you must use a portrait orientation!</h6>
        <h6>If you are using a computer and encountering this error, make the window bigger.</h6>
    </div>
<div id="container">
            <header id="header" style="display:none;">
                <div id="bara-wrap">
                    <img src="img/logo.png" alt="LOGO" class="logo" />
                    <nav id="social">
                        <ul class="social">
                            <li class="x1"><a href="https://www.facebook.com/octaniculescucom-1989623107979543/" target="_blank" title="Only for contact, message me there!" class="xx1"><i class="fab fa-facebook-f"></i></a></li>
                            <li class="x1 x2 x3"><a href="mailto:contact@octaniculescu.com?cc=octavian.a.niculescu@gmail.com" title="Contact me via email!" class="xx1 xx2"><i class="far fa-envelope"></i></a></li>
                        </ul>
                    </nav>
                    <nav id="bara">
                        <ul class="butoane">
                            <li class="btn"><a href="./index.html" id="active" class="home x1">home</a></li>
                            <li class="btn"><a href="./about.html" class="about x1">about</a></li>
                            <li class="btn"><a href="./skills.html" class="skills x1">skills</a></li>
                            <li class="btn"><a href="./contact.html" class="contact x1">contact</a></li>
                        </ul>
                    </nav>
                </div>
            </header>
            <div id="central">
                <div id="intro-wrap">
                    <h1 id="intro" style="display:none;">hi</h1>
                    <h6 class="intro" style="display:none;">This is a small step to achieve one of my dreams. A small place on the internet where people get to know me. Creative and functional, built with passion and hard work.</h6>
                    <div id="button-wrap">
                        <button type="button" id="more" style="display:none;">Learn more</button>
                    </div>
                </div>
            </div>
            <div id="hr" style="display: none;">
                <hr />
            </div>
</div>   
    <script src="js/jquery-3.2.1.min.js"></script>
    <script src="js/loader.js"></script>
</body>
</html>

我也试过这样做:

<ul class="butoane">
    <li class="btn"><a href="index.html" id="active" class="home x1">home</a></li>
    <li class="btn"><a href="about.html" class="about x1">about</a></li>
    <li class="btn"><a href="skills.html" class="skills x1">skills</a></li>
    <li class="btn"><a href="contact.html" class="contact x1">contact</a></li>
</ul>

你能告诉我发生了什么事吗?我真的不明白为什么它不起作用。谢谢。

4

1 回答 1

2

是否有任何 JavaScript 文件称为?

链接可以通过JavaScript

于 2020-03-04T06:48:11.780 回答