html - anchor 标记不能在 div 中间歇性工作

标签 html css

我在 div 中有这个 anchor 标记,它显示为弹出窗口。 我的 anchor 是可点击的,但它无法导航到 href 中的 url,并且此问题间歇性地发生。请帮助我解决问题,因为我不明白是什么导致了这个问题。

 .button {
  display: block;
  width: 360px;
  margin-top: 1em;
  padding: 1em;
  border: none;
  border-radius: 0.25em;
  text-align: center;
  text-transform: uppercase;
  font-size: 1em;
  font-weight: bold;
  display: inline-block;
  margin-right: 1.75em;
  text-align: left;
  z-index: 10;
}

a.button:hover, .ff-form button:hover,
.ff-form input[type="reset"]:hover,
.ff-form input[type="button"]:hover,
.ff-form input[type="submit"]:hover {
  -webkit-transition: 0.4s;
  -moz-transition: 0.4s;
  -o-transition: 0.4s;
  transition: 0.4s;
}
<div class="footer">
      <a class="button" href="http://iffi.shop.com/cart">GO TO BASKET</a>
</div>

最佳答案

在您的 href url 中,我删除了“购物车”。然后它正在工作。对于购物车,我认为它不是正确的网址。

 .button {
      display: block;
      width: 360px;
      margin-top: 1em;
      padding: 1em;
      border: none;
      border-radius: 0.25em;
      text-align: center;
      text-transform: uppercase;
      font-size: 1em;
      font-weight: bold;
      display: inline-block;
      margin-right: 1.75em;
      text-align: left;
      z-index: 10;
    }

a.button:hover, .ff-form button:hover,
.ff-form input[type="reset"]:hover,
.ff-form input[type="button"]:hover,
.ff-form input[type="submit"]:hover {
  -webkit-transition: 0.4s;
  -moz-transition: 0.4s;
  -o-transition: 0.4s;
  transition: 0.4s;
}
<div class="footer">
            <a class="button" href="http://iffi.shop.com">GO TO BASKET</a>
</div>      
 

关于html - anchor 标记不能在 div 中间歇性工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43231106/

相关文章:

html - 为什么我的常规导航栏会覆盖标题而折叠的导航栏不会? ( Bootstrap/整页)

php - 在 Wordpress 博客之外查询 Wordpress 数据库以返回最新的博客链接、摘录

html - CSS。绝对定位 DIV 中的垂直中心

javascript - 从每个 div 的 data-src 获取数据并在 div 上使用该数据

html - 在 CSS 中设置图像周围的背景

jquery - 向左滑动内部div无限循环

HTML 代码中的 PHP 变量

html - 根据标题宽度过渡

javascript - 防止在加载 React 组件时出现动画

javascript - 悬停时弹出表单 - 如何使其成为页面上唯一的一个?