在侧窗格/框架中打开链接?

时间:2015-10-22 23:19:39

标签: javascript html css

我希望能够点击“我的工作”并将其打开在同一页面上,但只在页面的右半部分打开,而左边的所有内容都保持不变。基本上,一旦有人点击“我的工作”,页面就会分成两部分。我确信这是一个少年问题,但我迷失了,只是开始了我的旅程。我找到了一些JavaScript,但我无法让它工作。我相信该文件是Split.js。

h1 {
    font-family: "Fira Sans";
    font-style: bold;
    font-size: 40px;
    color:lightgray;
}

body {
    background-color:black;
    font-family: "Fira Sans";
}

#nav {
    color:lightgray;
}

#nav a{
    width:150px;
}

#img{
    opacity:0.85;
    position:absolute;
}

a {
    font-family: "Fira Sans";
    font-size: 20px;
    color:lightgray;
    text-decoration: none;
}

a:hover {
    color:white;
}

#footer{
    padding: 20px;
    position:absolute;
    bottom:0;
    margin-left: 65px;
}
<!DOCTYPE html>
<html>
   <head>
      <title>Designs by RM</title>
      <link rel="stylesheet" href="main.css">
      <script src="split.js" type="text/javascript"></script>
   </head>
    <h1>Ryan Manthey</h1>
   <body>
      
       

<div id="nav">
       <a href="designs.html">My Work</a>
</div>


       
       

       
       
<div id="img">
    <img src="ferris_wheel.jpg" alt="ferris wheel" width="700" height="600">
</div>  
       
</body>
</html>

0 个答案:

没有答案