我正確地將我的PDF鏈接到我的項目並拼寫正確,但是當我將鼠標懸停在上面並點擊它時,什麼也沒有發生。我不確定它是否與一切的定位有關?爲什麼我的pdf鏈接不工作?
body {
margin: 0px;
padding: 0px;
height: 100%;
background: white;
}
/*----------header styles-------------*/
#header {
color: #D7DADB;
font-family: 'Roboto', sans-serif;
font-weight: 300;
font-size : 15px;
text-align: left;
width: 100%;
padding-left: 3em;
position: relative;
height: 15%;
box-sizing: border-box;
padding-top: 1em;
}
#header img
{
\t float: left;
\t padding-left: 3em;
}
h1{
width: 9em;
float: left;
padding-left: 0.5em;
color: #45CCCC;
padding-bottom: 1px;
}
#nav {
width: 50%;
margin:0;
padding:0;
text-align: right;
color: red;
font-size:20px;
float: right;
padding-right: 2em;
}
#nav ul {
padding: 1px;
}
#nav li {
display: inline;
padding: 38px;
}
#nav li a {
color: #2C3E50;
text-decoration: none;
}
#nav li a:hover {
color: #45CCCC;
}
/*----------hero image styles-------------*/
#hero{
\t padding-top: 25em;
\t width: 100%;
\t height: 30em;
\t position: relative;
\t z-index: -1;
}
#heroImage
{
\t top: 9%;
\t width: 100%;
\t z-index: 1;
\t position: absolute;
}
#overlay{
\t width: 34em;
\t top: -5%;
\t margin-left: 30%;
\t z-index: 2;
\t position: relative;
\t clear: left;
}
h2{
\t width: 100%;
\t position: relative;
\t font-family: 'Roboto', sans-serif;
\t font-weight: 300;
\t font-size: 60px;
\t float: center;
\t color: white;
\t opacity: 1.0;
\t text-shadow: 2px 2px 3px #000000;
\t text-align: center;
}
h3{
\t width: 100%;
\t position: relative;
\t font-family: 'Roboto', sans-serif;
\t font-weight: 300;
\t font-size: 30px;
\t color: white;
\t opacity: 1.0;
\t text-shadow: 3px 3px 2px #000000;
\t text-align: center;
}
a.down{
\t font-family: 'Roboto', sans-serif;
\t font-weight: 400;
\t text-decoration: none;
\t color: #181b1e;
\t background: #45CCCC;
\t position: relative;
\t padding: 0.6em 1em;
\t font-size: 1.2em;
\t -webkit-border-radius: 6px;
\t width: 100%;
}
a.down:hover{
\t text-decoration: underline;
}
<body>
\t <div id="header">
\t \t <a href="index.html"><div id="leftHeader">
\t \t <img src="assets/logo2.jpg" alt="Logo" style="width:65px;height:65px">
\t \t <h1>Amanda Farrington</h1>
\t </div>
\t \t <div id="nav">
\t \t
<ul>
<li><a href="about.html">About</a></li>
<li><a href="#workJump">Work</a></li>
<li><a href="contact.html">Contact</a></li>
<li><a href="notes.html">Notes</a></li>
</ul>
\t \t </div>
\t </div>
\t <div id="hero">
\t \t <div id="heroImage">
\t \t <img src="assets/trees.jpg" alt="trees" style="width:100%;height:10%">
\t \t </div>
\t \t <div id="overlay">
\t \t <h2>Amanda Farrington</h2>
\t \t <h3>Graphic Artist | Web Designer</h3>
<a href="assets/resume.pdf" class="down">View Resume</a>
\t \t </div>
\t </div>
該代碼似乎是正確的。如果您嘗試在地址欄中輸入PDF地址,會發生什麼情況?你能看見它嗎? –
是的,我可以看到它。 –