切换导航栏未显示列表元素

时间:2018-08-27 07:39:00

标签: javascript jquery html css

< script type = "text/javascript" >

  $(".overlay").hover(
    function() {
      $(".overlay-desc").toggleClass("on");
    });


<
/script>


<
script >
  $("#nav a").click(function(e) {
    e.preventDefault();
    $(".toggle").hide();
    var toShow = $(this).attr('href');
    $(toShow).show();
  });

<
/script>
body {
  width: 100%;
}

.pad-lefrighp .col-sm-12,
.pad-lefrighp .col-xs-12,
.pad-lefrighp .col-md-4 {
  margin: 0;
}

.myclients .pad-lefrighp {
  padding: 0 10px;
  margin-bottom: 150px;
  margin-top: -200px;
}

@media screen and (min-width: 100px) {
  .myclients .client_img {
    height: 10px;
    width: 10px;
  }
}

.myclients .margbottom {
  padding-bottom: 30px;
}

.myclients .innercontant .postboxa {
  background: #fbfbfb;
  padding: 5px;
  box-sizing: border-box;
  border: 1px solid #d1d1d1;
  max-height: 420px;
}

.myclients .innercontant .postbox .postimage {
  height: 120px;
}

.myclients a {
  color: red;
}

.myclients ul {
  list-style-type: none;
  text-align: center;
  width: 1300px;
}

.myclients li {
  display: inline-block;
  border: 1px solid red;
  padding: 0px;
}

.myclients ul li a {
  padding: 0px 12px;
  display: inline-block;
  margin: 0 8px !important;
  text-decoration: none;
  background-color: #D01A1A;
}

.myclients #all {
  font-family: Times New Roman;
  font-size: 22px;
}

.myclients .innercontant .postbox h6 {
  font-size: 13px;
  margin: 5px;
}

.myclients .wordwrptext {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #424244;
}

.myclients .innercontant .btnn {
  margin-top: 15px;
  background: #fbad3f;
  border-radius: 4px;
  color: #fff;
}

.myclients .f-right {
  float: right;
}

.myclients .btn-sm,
.btn-group-sm>.btn {
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 3px;
}

.myclients a {
  text-decoration: none;
}

.myclients a {
  cursor: pointer;
  font-size: 14px;
}

.myclients .postimage {
  margin-left: -12px;
}

* {
  box-sizing: border-box;
}

.myclients .content {
  width: 960px;
  margin: 0 auto;
  margin-top: 150px;
}

.myclients .col1 {
  float: left;
  margin-right: 30px;
}

.myclients .col2 {
  float: right;
}

.myclients .bg {
  display: inline-block;
  width: 450px;
  height: 320px;
  background-size: 450px 320px;
}

.myclients .bg2 {
  display: inline-block;
  width: 450px;
  height: 320px;
  background-size: 450px 320px;
}

.myclients .box {
  display: inline-block;
  width: 450px;
  height: 320px;
  transition: all ease-in 0.3s;
}

.myclients .box:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.myclients .box:hover .image-caption {
  margin-top: -320px;
  background-color: rgba(208, 26, 26, 0.46);
  height: 68%;
}

.myclients .image-caption {
  position: absolute;
  display: inline-block;
  width: 430px;
  text-align: center;
  padding: 20px 0;
  color: #ffffff;
  text-transform: uppercase;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 20px;
  text-shadow: 0px 2px 2px rgba(0, 0, 0, 0.8);
  margin-top: -69px;
  background-color: rgba(0, 0, 0, 0.7);
  transition: all ease-in 0.3s;
  margin-left: 0px;
}

.myclients .desc {
  position: absolute;
  width: 450px;
  margin-top: -200px;
  text-decoration: none;
  text-align: center;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 14px;
  line-height: 1.4;
  color: transparent;
  text-shadow: 0px 2px 2px rgba(0, 0, 0, 0);
  transition: all ease-in 0.3s;
  margin-left: 0px;
}

.myclients .see-more {
  text-decoration: underline;
}

.legend {
  text-align: center;
  font-family: Helvetica, Aria, sans-serif;
  font-size: 11px;
  color: rgb(192, 192, 192);
}

.myclients .on {
  color: #ffffff;
  text-shadow: 0px 2px 2px rgba(0, 0, 0, 0.8);
}

.myclients .navv a {
  border: 1px solid #D01A1A;
  padding: 15px 20px;
  margin: 0 8px !important;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.myclients .navv a.selected {
  color: #ffffff;
  background: #D01A1A;
}

.myclients .navv a:hover {
  color: #ffffff;
  background: #D01A1A;
}

a:active {
  outline: 0;
  text-decoration: none;
  border: 0;
}

@media screen and (min-width: 400px) and (max-width: 2000px) {
  width: 100%;
}

.myclients .navv {}

.img-fluid {
  max-width: 100%;
  height: auto;
}
<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="">
<!--<![endif]-->

<head>
  <meta charset="utf-8">
  <meta name="description" content="">

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>abcn</title>
  <link rel="stylesheet" href="css/bootstrap.min.css">
  <link rel="stylesheet" href="css/flexslider.css">
  <link rel="stylesheet" href="css/jquery.fancybox.css">
  <link rel="stylesheet" href="css/main.css">
  <link rel="stylesheet" href="css/responsive.css">
  <link rel="stylesheet" href="css/font-icon.css">
  <link rel="stylesheet" href="css/animate.min.css">
  <link rel="stylesheet" type="text/css" href="css/style4.css" />
  <link href="https://fonts.googleapis.com/css?family=Great+Vibes" rel="stylesheet">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
  <link rel="stylesheet" href="http://cdn.bootcss.com/animate.css/3.5.1/animate.min.css">






  <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>
  <link href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.css" rel="stylesheet" type='text/css'>

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>

<body>


  <!-- header section -->
  <section class="banner" role="banner" id="home">
    <header id="header" class="fixed">
      <div class="header-content clearfix">
        <a class="logo" href="index.html"><img src="images/logo.jpg" style="width: 180px; height: 100px" class="img-rounded"></a>
        <nav class="navigation" role="navigation">
          <ul class="primary-nav">
            <li><a href="index.php">Home</a></li>
            <li><a href="designs.php">designes</a></li>
            <li><a href="about.php">About</a></li>
            <li><a href="gal.php">New Arrivals</a></li>
            <li><a href="contact.php">Contact</a></li>
          </ul>
        </nav>
        <a href="#" class="nav-toggle">Menu<span></span></a> </div>
    </header>
  </section>


  <div class="myclients">
    <div class="container-fulid ">
      <div class="pad-lefrighp">
        <div class="row">
          <div class="col-sm-12 col-xs-12 col-md-4">
            <div class="content">
              <div class="col1">
                <div class="bg">

                  <a class="" href="admin/uploads/1.jpg" target="_blank"><img src="admin/uploads/1.jpg" class="img-fluid" /> <span class="image-caption">Price: <i class="fa fa-rupee" style="font-size:20px"></i>&nbsp; 500</span> </a>
                </div>
              </div>

            </div>
          </div>
        </div>
      </div>
    </div>





    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/jquery.flexslider-min.js"></script>
    <script src="js/jquery.fancybox.pack.js"></script>
    <script src="js/retina.min.js"></script>
    <script src="js/modernizr.js"></script>
    <script src="js/main.js"></script>
    <script type="text/javascript" src="js/jquery.contact.js"></script>
</body>

</html>

在这里,导航栏正在PC中运行。来到手机导航栏不起作用。当我单击导航菜单图标时,它仅显示同一页面。它没有显示脚本停止的列表元素(如首页,关于我们,设计等)以及移动响应性问题。请检查一次。提前致谢。

0 个答案:

没有答案