我在悬停时显示导航菜单有问题

时间:2019-07-05 22:30:01

标签: html css

我在鼠标悬停在另一个div元素上显示导航菜单时遇到问题。 当显示宽度为600px(媒体规则)时,将鼠标悬停在菜单上的按钮将显示在页面顶部。我不明白为什么

buttonDiv:hover menu {
    display:block;
}

(#prsut:hover #Izbornik)无法正常工作。 我在片段中放入了html和css,现在我只能看到html代码,所以希望您能同时看到它们 抱歉,我没有用英语写代码 谢谢你的帮助

$.validator.addMethod("regex", function(value, element, regexp) {
  var re = new RegExp(regexp);
  return this.optional(element) || re.test(value);
}, $.validator.format("ne valja regex"));

$(document).ready(function() {

  $("#forma").validate({
    rules: {
      dostavaIme: {
        required: true,
        regex: "^[a-zA-Z]+$"
      },
      dostavaAdresa: {
        required: true,
        regex: "^[a-zA-Z]+$"
      },
      dostavaPostanskiBroj: {
        required: true,
        regex: "^[0-9]+$",
        minlength: 5,
        maxlength: 5
      },
      dostavaTelefon: {
        required: true,
        regex: "[+][0-9][0-9][0-9][-][0-9][0-9][0-9]"
      }
    },
    messages: {

    }
  });
});
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="widtd=device-widtd, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <script src="external/jquery/jquery.js"></script>
  <script src="jquery-validation-1.16.0/dist/jquery.validate.js"></script>
  <link rel="stylesheet" type="text/css" href="jquery-validation-1.16.0/demo/css/screen.css">
  <link rel="stylesheet" type="text/css" href="./wrd_files/stilovi.css">
  <title>WRD ispit</title>

</head>

<body>

  <nav>
    <div id=prsut style="text-align: left;font-size:30px;margin: 20px;">
      <a id="IzbornikDugme">☰</a><span>BROJ INDEXA</span>
    </div>

    <div id="Izbornik" style="clear:botd">
      <a class="IzbornikStavka" href="#">Home</a>
      <a class="IzbornikStavka" href="#">AMF 1</a>
      <a class="IzbornikStavka" href="#">AMF 2</a>
      <a class="IzbornikStavka" href="#">AMF 3</a>
      <a class="IzbornikStavka" href="#">AMF 4</a>
      <a class="IzbornikStavka" href="#">AMF 5</a>
    </div>
  </nav>


  <div id="wrapper">

    <div>
      <h1>Iznajmljivanje nekretnine</h1>
      <hr />
    </div>
    <label>Odaberite vilu</label>
    <div class="Kontejner">
      <div class="VilaKolonaWrapper">
        <img class="VilaKolonaOkvir" src="./wrd_files/team2.jpg" />
        <h3>Villa Mostar</h3>
        <h4>100 KM po danu</h4>
        <p class="VilaOpis">Villa u odlicnom stanju. Na klizistu, nije puno presla. Uskoro u centru Mostara</p>
      </div>

      <div class="VilaKolonaWrapper">
        <img class="VilaKolonaOkvir" src="./wrd_files/team1.jpg" />
        <h3>Villa Buna - Blagaj</h3>
        <h4>120 KM po danu</h4>
        <p class="VilaOpis">Odlicna za inznajmljivanje turistima i odlicnim studentima.</p>
      </div>

      <div class="VilaKolonaWrapper">
        <img class="VilaKolonaOkvir" src="./wrd_files/team3.jpg" />
        <h3>Villa Vlašić</h3>
        <h4>130 KM po danu</h4>
        <p class="VilaOpis">Buduće kancelarije FIT-a. Iskreno se nadamo.</p>
      </div>
    </div>
    <div class="Kontejner">
    </div>
    <div id="zaFormu" style="">
      <form id=forma>
        <label for="dostavaIme">Ime</label>
        <input id="dostavaIme" name="dostavaIme" placeholder="kupac ime" />

        <label for="dostavaAdresa">Adresa</label>
        <input id="dostavaAdresa" name="dostavaAdresa" placeholder="kupac adresa" />

        <label for="dostavaPostanskiBroj">Poštanski broj</label>
        <input id="dostavaPostanskiBroj" name="dostavaPostanskiBroj" value="" />

        <label for="dostavaTelefon">Telefon</label>
        <input id="dostavaTelefon" name="dostavaTelefon" placeholder="+387-61-888-8888" />

        <label for="napomena">Napomena</label>
        <textarea id="napomena" style="width: 100%"></textarea>
        <br/>
        <input type="submit" value="Dodaj kupca" />
      </form>
      <label for="filtiranje">Filtriraj podatke po imenu</label>
      <input id="filtiranje" placeholder="upisi dio imena" />
      <table id="tabelaID" border="1px" style="width: 100%">
        <tdead>
          <tr>
            <th>Id Kupca</th>
            <th>Datum</th>
            <th>Ime</th>
            <th>Adresa</th>
            <th>Poštanski broj</th>
            <th>Telefon</th>
            <th>Napomena</th>
          </tr>
        </tdead>
        <tbody>

        </tbody>
      </table>
    </div>

    <div id=cr>
      <p>Copyright by FIT</p>
    </div>

    <script src="./wrd_files/script.js"></script>
</body>

</html>

0 个答案:

没有答案