html - 输入不可点击

标签 html css

我不知道为什么,但我的输入是不可点击的。 我看到与类 class="cta-inner text-center rounded" 有冲突,但我想保留此类的设计。 如果有人有想法

body {
  font-family: 'Lora';
  background: -webkit-gradient(linear, left top, left bottom, from(rgba(47, 23, 15, 0.65))), url("../img/bg.jpg");
  background: linear-gradient(rgba(47, 23, 15, 0.65)), url("../img/bg.jpg");
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Raleway';
}

nav {
  flex-direction: row;
}

p {
  line-height: 1.75;
}

.text-faded {
  color: rgba(255, 255, 255, 0.3);
}

.site-heading {
  margin-top: 5rem;
  margin-bottom: 5rem;
  text-transform: uppercase;
  line-height: 1;
  font-family: 'Raleway';
}

.site-heading .site-heading-upper {
  display: block;
  font-size: 2rem;
  font-weight: 800;
}

.site-heading .site-heading-lower {
  font-size: 5rem;
  font-weight: 100;
  line-height: 4rem;
}

.page-section {
  margin-top: 5rem;
  margin-bottom: 5rem;
}

.section-heading {
  text-transform: uppercase;
}

.section-heading .section-heading-upper {
  display: block;
  font-size: 1rem;
  font-weight: 800;
}

.section-heading .section-heading-lower {
  display: block;
  font-size: 3rem;
  font-weight: 100;
}

.bg-faded {
  background-color: rgba(255, 255, 255, 0.85);
}

#mainNav {
  background-color: rgba(47, 23, 15, 0.9);
  font-family: 'Raleway';
}

#recherche {
  size: 1500px;
}

#valider {
  text-align: right;
}

#mainNav .navbar-brand {
  color: #e6a756;
}

#mainNav .navbar-nav .nav-item .nav-link {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 800;
}

#mainNav .navbar-nav .nav-item.active .nav-link {
  color: #e6a756;
}

@media (min-width: 992px) {
  #mainNav .navbar-nav .nav-item .nav-link {
    font-size: 0.9rem;
  }
  #mainNav .navbar-nav .nav-item .nav-link:hover {
    color: rgba(255, 255, 255, 0.4);
  }
  #mainNav .navbar-nav .nav-item.active .nav-link:hover {
    color: #e6a756;
  }
}

.btn-xl {
  font-weight: 700;
  font-size: 0.8rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  padding-left: 2rem;
  padding-right: 2rem;
}

.intro {
  position: relative;
}

@media (min-width: 992px) {
  .intro .intro-img {
    width: 75%;
    float: right;
  }
  .intro .intro-text {
    left: 0;
    width: 60%;
    margin-top: 3rem;
    position: absolute;
  }
  .intro .intro-text .intro-button {
    width: 100%;
    left: 0;
    position: absolute;
    bottom: -2rem;
  }
}

@media (min-width: 1200px) {
  .intro .intro-text {
    width: 45%;
  }
}

.cta {
  padding-top: 5rem;
  padding-bottom: 5rem;
  background-color: rgba(230, 167, 86, 0.9);
}

.cta .cta-inner {
  position: relative;
  padding: 3rem;
  margin: 0.5rem;
  background-color: rgba(255, 255, 255, 0.85);
}

.cta .cta-inner:before {
  border-radius: 0.5rem;
  content: '';
  position: absolute;
  top: -0.5rem;
  bottom: -0.5rem;
  left: -0.5rem;
  right: -0.5rem;
  border: 0.25rem solid rgba(255, 255, 255, 0.85);
}

@media (min-width: 992px) {
  .about-heading .about-heading-img {
    position: relative;
    z-index: 0;
  }
  .about-heading .about-heading-content {
    margin-top: -5rem;
    position: relative;
    z-index: 1;
  }
}

@media (min-width: 992px) {
  .product-item .product-item-title {
    position: relative;
    z-index: 1;
    margin-bottom: -3rem;
  }
  .product-item .product-item-img {
    position: relative;
    z-index: 0;
    max-width: 60vw;
  }
  .product-item .product-item-description {
    position: relative;
    z-index: 1;
    margin-top: -3rem;
    max-width: 50vw;
  }
}

.list-hours {
  font-size: 0.9rem;
}

.list-hours .list-hours-item {
  border-bottom: 1px solid rgba(230, 167, 86, 0.5);
  padding-bottom: .25rem;
  margin-bottom: 1rem;
  font-style: italic;
}

.list-hours .list-hours-item.today {
  font-weight: bold;
  color: #e6a756;
}

@media (min-width: 992px) {
  .list-hours {
    width: 50%;
    font-size: 1.1rem;
  }
}

.address strong {
  font-size: 1.2rem;
}

.footer {
  background-color: rgba(47, 23, 15, 0.9);
}

.text-primary {
  color: #e6a756 !important;
}

.bg-primary {
  background-color: #e6a756 !important;
}

.btn {
  -webkit-box-shadow: 0px 3px 3px 0px rgba(33, 37, 41, 0.1);
  box-shadow: 0px 3px 3px 0px rgba(33, 37, 41, 0.1);
}

.btn-primary {
  background-color: #e6a756;
  border-color: #e6a756;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #df902a;
  border-color: #df902a;
}

.font-weight-light {
  font-weight: 100 !important;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<section class="page-section cta">
  <div class="row">
    <div class="col-xl-9 mx-auto">
      <div class="cta-inner text-center rounded">
        <h2 class="section-heading mb-5">
          <span class="section-heading-upper">Ajouter un</span>
          <span class="section-heading-lower">Contact</span>
        </h2>
        <form action="envoi.php" method="post" enctype="multipart/form-data" class="list-unstyled list-hours mb-5 text-left mx-auto">
          <div class="list-unstyled-item list-hours-item d-flex">Nom<br>
            <input class="ml-auto" type="text" name="Nom" required><br>
          </div>
          <div class="list-unstyled-item list-hours-item d-flex">Entreprise<br>
            <input class="ml-auto" type="text" name="Entrprise" required><br>
          </div>
          <div class="list-unstyled-item list-hours-item d-flex">Numéro de téléphone<br>
            <input class="ml-auto" name="tel"><br>
          </div>
          <div class="list-unstyled-item list-hours-item d-flex">Commentaire<br>
            <input class="ml-auto" type="text" name="Commentaire"><br>
          </div>
          <div>
            <input id="valider" class="btn btn-default btn-lg active" type="submit" value="Valider">
          </div>
        </form>
      </div>
    </div>
  </div>
</section>

提前致谢

最佳答案

您的 CSS 在您的输入前导致了一个 div。
因此,您的输入不可点击。
这是你错误的 css block 。

.cta .cta-inner:before {
border-radius: 0.5rem;
content: '';
position: absolute;
top: -0.5rem;
bottom: -0.5rem;
left: -0.5rem;
right: -0.5rem;
border: 0.25rem solid rgba(255, 255, 255, 0.85);
}

只需删除它,因为它未被使用且对用户不可见。
那它应该是固定的!
查看我为您制作的这个 jsfiddle:https://jsfiddle.net/9zvoecq4/

关于html - 输入不可点击,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53205210/

相关文章:

php - 在 div 不回显 php 之后

jquery - 水平列表中的垂直子列表给出对齐问题

css - 向下/向上滑动动画

html - 无效的 html 标记

html - 使用 HTML/CSS 将可变大小数据/文本列表与相应的标签/文本对齐

css - 我如何应用位于同一 anchor 标记内的 :hover CSS to H2,?

html - 如何以 html 格式播放上传到 Amazon S3 存储桶的文件?

php - Jquery 查找 div 是否到达滚动底部

javascript - Jquery一键更新表单上的多个输入字段

css - 有没有办法获取传递给 Sass mixin 的参数数组?