Javascript Html文件还会打开一张图片吗?

Javascript Html文件还会打开一张图片吗?,javascript,jquery,html,Javascript,Jquery,Html,我在mac电脑上,当我双击html文件时,它会打开一张我在预览中使用的照片。如果我用Google Chrome“打开”,那么图片将在它自己的选项卡中打开。html文件本身可以正确加载和运行,图片也会正常显示。我只是不知道为什么它还会在一个新的标签(Chrome)或预览(safari)中打开图片文件 html 我在本地做所有事情(只是一个初学者),我有一个jQuery数据库链接。不确定这些是否重要 CSS 我在你的代码中没有看到任何试图显示图像的内容?这与你的代码无关。你在finder中同时打开了

我在mac电脑上,当我双击html文件时,它会打开一张我在预览中使用的照片。如果我用Google Chrome“打开”,那么图片将在它自己的选项卡中打开。html文件本身可以正确加载和运行,图片也会正常显示。我只是不知道为什么它还会在一个新的标签(Chrome)或预览(safari)中打开图片文件

html

我在本地做所有事情(只是一个初学者),我有一个jQuery数据库链接。不确定这些是否重要

CSS


我在你的代码中没有看到任何试图显示图像的内容?这与你的代码无关。你在finder中同时打开了两个文件。我忘了粘贴css。这一问题自行停止。我不知道。谢谢你澄清这一点,安迪。这正是我想知道的:它是否与代码有关。你知道这样的事情是怎么发生的吗?如果它“自行”停止,可能是你在做什么而没有注意到的事情。否则,我会怀疑script.js中有什么东西。除非该脚本全部是script.js。
<!DOCTYPE html>
<html>
<head>
    <link rel='stylesheet' href='style.css'/>
    <script src="jQuery.js"></script>
    <script src="script.js"></script>
</head>
<body>
    <div id=top>
        <h1>Lamborghini</h1>
    </div>

    <div id=navbar>
            <div id=navlink> <a href="Made.html">Home</a> </div>
            <div id=navlink> <a href="Made.html">Photos</a> </div>
            <div id=navlink> <a href="Made.html">Videos</a> </div>
            <div id=navlink> <a href="Made.html">About Us</a> </div>
            <div id=navlink> <a href="Made.html">Contact</a> </div>
    </div>

    <div>
        <div id=leftpanel></div>
    </div>
</body>
</html>
if(typeof jQuery === "undefined")
    {console.log("jQuery is not loaded.")}
else
    {console.log("jQuery is loaded.")}

$(document).ready(
    $(document).scroll(
        function()
            {$("div").fadeTo(1000,1)}
        )
    );
body
    {opacity:0}

.fade2
    {opacity:1;
    position:fixed;
    z-index:-1;
    width:100%;
    opacity:0}

div#navbar
    {height:50px;
    width:100%;
    opacity:0;
    border-radius:7px;
    background-color:rgba(0,150,255,0.8);
    margin:auto;
    overflow:hidden}

div#navlink:hover
    {background-color:rgba(0,105,180,0.6)}

div#navlink
    {width:20%;
    display:inline-block;
    border:1px solid black;
    height:100%;
    margin:0;
    float:left;
    text-align:center;
    box-sizing:border-box;}

a
    {text-decoration:none;
    color:white;
    position:relative;}

#top
    {text-align:center;
    height:544px;
    background:url("Lambo2.jpg") bottom no-repeat;
    background-size:100%;
    background-color:white;
    margin:0px;
    margin-top:-45px;
    width:100%;
    background-color:transparent;
    opacity:0.9}

h1
    {position:relative;
    font-size:4em;
    top:.38em;
    color:black;
    font-family:cursive;
    text-align:left}


#leftpanel
    {height:1000px;
    width:45%;
    margin-left:4%;
    margin-top:1%;
    float:left;
    background-color:rgba(0,150,255,1);
    opacity:0}

span
    {position:relative;
    top:1em}