首页 > 解决方案 > 测试时页脚中显示的正文链接,但代码中没有

问题描述

对不起我的天真我对网络开发很陌生,必须为一个 uni 项目创建这个。我遇到的问题是我有一个图像缩略图网格,该网格链接到单独页面上的完整版本,网格中的最后一个图像有一个链接,该链接显示并将内容推出页脚并检查页面上的元素说它在页脚 div 中的链接,但在代码中它不存在。任何帮助,将不胜感激。

.grid {
  margin-left: 15%;
  margin-right: 15%;
  margin-top: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}

.square {
  display: inline-block;
  float: left;
  position: relative;
  width: 30%;
  padding-bottom: 30%;
  /* = width for a 1:1 aspect ratio */
  margin: 1.66%;
  overflow: hidden;
}

.content {
  position: absolute;
  height: 100%;
  width: 100%;
  padding: 0%;
}


/*  For responsive images */

.content .rs {
  width: auto;
  height: auto;
  max-height: 100%;
  max-width: 100%;
}

.footer {
  height: 45px;
  width: 100%;
  background-color: white;
  overflow: auto;
  position: -webkit-sticky;
  position: sticky;
  z-index: 1;
  bottom: 0;
  list-style-type: none;
  overflow: hidden;
  padding-bottom: 5px;
  padding-top: 5px;
  overflow: hidden;
}

.footer a {
  display: inline;
  color: black;
  text-align: center;
  padding-top: 5px;
  padding-bottom: 10px;
  text-decoration: none;
  font-family: 'myntieregular';
  src: url('myntie-regular-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-size: 45px;
  float: left;
  text-decoration: none;
  width: 33%;
  text-align: center;
  border-top-style: solid;
  border-color: #c7c7c7;
  border-width: 2px 0px;
}
<div class="grid">
  <div class="square">
    <div class="content">
      <a href="Gallery\DSCF1629.html"><img class="rs" src="Images\Thumbnails\DSCF1629_Thumbnail.png" />
    </div>
  </div>
  <div class="square">
    <div class="content">
      <a href="Gallery\DSCF1425.html"><img class="rs" src="Images\Thumbnails\DSCF1425_Thumbnail.png" />
    </div>
  </div>
  <div class="square">
    <div class="content">
      <a href="Gallery\DSCF1723.html"><img class="rs" src="Images\Thumbnails\DSCF1723_Thumbnail.png" />
    </div>
  </div>
</div>

<div class="footer">
  <a href="link" target="_blank"><img src="Image" alt="Instagram" style="width:30px;height:30px;"></a>
  <a href="link" target="_blank"><img src="Image" alt="Email" style="width:30px;height:30px;"></a>
  <a href="link/" target="_blank"><img src="Image" alt="linkedin" style="width:30px;height:30px;"></a>
</div>

标签: htmlcss

解决方案


忘记关闭div中的<a>标签。"grid"

很难看到,因为它太偏右了。


推荐阅读