<a> Tag doesn&#39;t give option to click</a>

时间:2015-04-09 03:39:11

标签: html css

我创建了一个网站(仅供个人使用),当包含链接到网页的标签时,我没有选择点击该链接。

&#13;
&#13;
@font-face {
  font-family: typewrite;
  src: url(fonts/typewcond_regular.otf);
}
@font-face {
  font-family: typewrite;
  src: url(fonts/typewcond_bold.otf);
  font-weight: bold;
}
@font-face {
  font-family: typewriteSub;
  src: url(fonts/typewcond_demi.otf);
}
div.header {
  font-family: typewriteSub;
  font-size: 30;
  border-bottom: 4px solid #BDBDBD;
  position: fixed;
  top: 0px;
  left: 0px;
  width: 100%;
  height: auto;
  background-color: #FFFFFF;
  z-index: 2;
}
div.post {
  font-family: typewrite;
  font-size: 25;
  border: 2px solid #BDBDBD;
  padding: 0px 10px 0px 10px;
  margin-bottom: 10px;
  position: relative;
  width: 70%;
  left: 15%;
  z-index: -1;
}
div.headline {
  font-family: typewrite;
  font-size: 25;
  color: #424242;
  border: 4px solid #424242;
  padding: 0px 10px 0px 10px;
  margin-bottom: 10px;
  text-align: right;
  position: relative;
  width: 70%;
  left: 15%;
  z-index: -2;
}
div.headline img {
  vertical-align: center;
  float: left;
  min-height: 50%;
  max-height: 90%;
  min-width: 5%;
  max-width: 20%;
}
div.headline h2 {
  color: #000000;
  vertical-align: top;
  text-align: right;
  font-family: typewriteSub;
  font-size: 50;
}
h1 {
  font-family: typewrite;
  font-weight: bold;
  font-size: 30px;
  margin: 0;
}
h2 {
  font-family: typewriteSub;
  font-size: 50;
}
img.button {
  border-style: solid;
  border-color: #BDBDBD;
  border-width: 2px;
  border-spacing: 0px;
}
blockquote {
  border-style: solid;
  border-color: #585858;
  background-color: #848484;
  font-family: typewrite;
  font-style: italic;
}
blockquote h3 {
  font-family: typewriteSub;
  font-weight: bold;
  font-style: normal;
}
*:not(a) {
  pointer-events: none;
}
&#13;
<div class="header">
  <a href="javascript:history.go(0)">
    <img src="images/refresh.png" alt="Refresh" style="height:5%">
  </a>
  <h1 style="text-align:center">The Meaning</h1>
  <br>
</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>

<div class="headline">
  <img src="images/applewatch.jpg" alt="Apple Watch">
  <h2>Apple employees get 50% off the Apple Watch!</h2>
  Apple employees get a <em>significant</em> discount on the new Apple Watches!
  <br>
</div>
<div class="post">
  <h2>'Conversation with a stranger'(?) by <a href="https://ello.co/trentonleetiemeyer" target="_blank">trentonleetiemeyer</a></h2>
  <blockquote>
    At the bar, at a bar.
    <br>This one is not my own.
    <br>I don't know
    <br>the bartender,
    <br>I don't know
    <br>the names of the heroes
    <br>in the frames on the walls.
    <br>I keep my head down,
    <br>nodding in and out of
    <br>a one-sided conversation
    <br>with a stranger.
    <br>He drones on,
    <br>rattling his saber,
    <br>spitting venom
    <br>at the President.
    <br>I change the subject
    <br>to sports,
    <br>the only thing
    <br>I care less about
    <br>than politics.
    <br>This gets the bartender
    <br>in on the discussion,
    <br>and I slide out the back door.
    <br>I light a cigar,
    <br>the smoke hangs in the air
    <br>but for a moment,
    <br>and start talking to a woman,
    <br>a woman who nods in and out
    <br>of a one-sided conversation
    <br>with a stranger.
  </blockquote>
</div>
<div class="post">
  <h2>'Good Decisions'(?) by <a href="https://ello.co/trentonleetiemeyer" target="_blank">trentonleetiemeyer</a></h2>
  <blockquote>
    I haven't made
    <br>a good decision
    <br>in my life,
    <br>but there is no regret.
    <br>Regret would infer
    <br>an intention to change.
    <br>I don't want to know
    <br>what would be
    <br>if I had followed the other path,
    <br>if I had taken a left
    <br>instead of a right.
    <br>
    <br>If I could meet the other me,
    <br>the one who made
    <br>all the right calls,
    <br>I'd probably be
    <br>more disappointed,
    <br>than jealous.
    <br>Disappointed,
    <br>to find that all
    <br>of my poor decisions
    <br>were the right calls,
    <br>all along.
    <br>
  </blockquote>
</div>
<div class="post">
  <h2>'Supposed to Write'(?) by <a href="https://ello.co/trentonleetiemeyer" target="_blank">trentonleetiemeyer</a></h2>
  <blockquote>
    I was supposed
    <br>to write a poem tonight.
    <br>It was going to be tight,
    <br>nothing too long,
    <br>something clever,
    <br>about mapping the human genome.
    <br>
    <br>There's always tomorrow.
    <br>
  </blockquote>
</div>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

您的链接无法点击,因为z-index为-1

从div.post选择器

中删除该样式
div.post {
    font-family: typewrite;
    font-size: 25;
    border: 2px solid #BDBDBD;
    padding: 0px 10px 0px 10px;
    margin-bottom: 10px;
    position: relative;
    width: 70%;
    left: 15%;
    /* z-index: -1; */
}

更多:z-index