首页 » 技术分享 » 响应式开发 微金所项目

响应式开发 微金所项目

 

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
   <link rel="stylesheet" href="css/bootstrap.min.css">
   <link rel="stylesheet" href="css/wjs_index.css">
   <link rel="stylesheet" href="css/bass.css">
    <style>
      .pcImg{
        width: 100%;
        height: 410px;
        display: block;
        background-position: center center;
        background-size: cover;
      }
      .mobileImg {
        width: 100%;
        display: block;
      }
      .mobileImg img {
        width: 100%;
        display: block;
      }
    </style>
    <title></title>
  </head>
  <body>
  
    <header class="wjs_header hidden-xs hidden-sm">
      <div class="container">
        <div class="row">
          <div class="col-md-2">
            <a href="javascript:;" class="wjs_code">
              <span class="glyphicon glyphicon-phone"></span>
              <span>手机微金所</span> 
              <span class="glyphicon glyphicon-chevron-down"></span>
              <img src="images/code.jpg" alt="">
            </a>
          </div>
          <div class="col-md-5">
            <span class="glyphicon glyphicon-phone-alt"></span>
            <a href="javascript:;">4006-89-4006(服务时间:9:00`21:00)
              联系在线客服
            </a>
          </div>
          <div class="col-md-2">
            <a href="javascript:;">常见问题</a>&nbsp;&nbsp;
            <a href="javascript:;">财富登录</a>
          </div>
          <div class="col-md-3">
            <button type="button" class="btn btn-danger">免费注册</button>
            <button type="button" class="btn btn-link">登录</button>
          </div>
        </div>
      </div>
      </header>
    <nav class="navbar navbar-default wjs_nav">
     <div class="container">
   
     <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">
        <span class="wjs_icon glyphicon glyphicon-yen"></span>
        <span class="wjs_icon ">微金所</span>
      </a>
     </div>

      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav hidden-sm">
        <li class="active"><a href="#">我要投资 
          <span class="sr-only">(current)</span></a></li>
        <li><a href="#">我要借贷</a></li>
        <li><a href="#">平台介绍</a></li>
        <li><a href="#">新手专区</a></li>
        <li><a href="#">最新动态</a></li>
        <li><a href="#">微平台</a></li>
      
      </ul>
      
      <ul class="nav navbar-nav navbar-right">
        <li><a href="#">个人中心</a></li>
      </ul>
      </div>
      </div>
      </nav>
    <div class="wjs_banner">
     <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
      <ol class="carousel-indicators">
      <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
      <li data-target="#carousel-example-generic" data-slide-to="1"></li>
      <li data-target="#carousel-example-generic" data-slide-to="2"></li>
      <li data-target="#carousel-example-generic" data-slide-to="3"></li>
     </ol>

      <div class="carousel-inner" role="listbox">
        <div class="item active" data-large-image="images/slide_01_2000x410.jpg" data-small-image="images/slide_01_640x340.jpg" >
      </div>
       <div class="item" data-large-image="images/slide_02_2000x410.jpg" data-small-image="images/slide_02_640x340.jpg">
    
        </div>
        <div class="item" data-large-image="images/slide_03_2000x410.jpg" data-small-image="images/slide_03_640x340.jpg">
    
        </div>
        <div class="item" data-large-image="images/slide_04_2000x410.jpg" data-small-image="images/slide_04_640x340.jpg">
    
        </div>


      </div>

  
        <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
           <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
              <span class="sr-only">Previous</span>
            </a>
            <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
              <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
              <span class="sr-only">Next</span>
            </a>
          </div>
              </div> 
    <div class="wjs_info hidden-xs">
       <div class="container">
         <div class="row">
          <div class="col-sm-6 col-md-4">
             <div class="media">
                <a href="javascript:;">
                   <span class="media-left glyphicon glyphicon-yen"></span>
                   <div class="media-body">
                     <h4 class="media-heading">支持交易保障</h4>
                     <p>银联支持全程保障支持安全</p>
                   </div>
                 </a>
              </div>
           </div>
           <div class="col-sm-6 col-md-4">
             <div class="media">
                <a href="javascript:;">
                   <span class="media-left glyphicon glyphicon-yen"></span>
                   <div class="media-body">
                     <h4 class="media-heading">支持交易保障</h4>
                     <p>银联支持全程保障支持安全</p>
                   </div>
                 </a>
              </div>
           </div>
          <div class="col-sm-6 col-md-4">
             <div class="media">
                <a href="javascript:;">
                   <span class="media-left glyphicon glyphicon-yen"></span>
                   <div class="media-body">
                     <h4 class="media-heading">支持交易保障</h4>
                     <p>银联支持全程保障支持安全</p>
                   </div>
                 </a>
              </div>
           </div>
           <div class="col-sm-6 col-md-4">
             <div class="media">
                <a href="javascript:;">
                   <span class="media-left glyphicon glyphicon-yen"></span>
                   <div class="media-body">
                     <h4 class="media-heading">支持交易保障</h4>
                     <p>银联支持全程保障支持安全</p>
                   </div>
                 </a>
              </div>
           </div>
          <div class="col-sm-6 col-md-4">
             <div class="media">
                <a href="javascript:;">
                   <span class="media-left glyphicon glyphicon-yen"></span>
                   <div class="media-body">
                     <h4 class="media-heading">支持交易保障</h4>
                     <p>银联支持全程保障支持安全</p>
                   </div>
                 </a>
              </div>
           </div>
           <div class="col-sm-6 col-md-4">
             <div class="media">
                <a href="javascript:;">
                   <span class="media-left glyphicon glyphicon-yen"></span>
                   <div class="media-body">
                     <h4 class="media-heading">支持交易保障</h4>
                     <p>银联支持全程保障支持安全</p>
                   </div>
                 </a>
              </div>
           </div>
         </div>
       </div>
         </div>
    <div class="wjs_reverse hidden-xs">
      <div class="container">
         <div class="row">
            <div class="col-sm-9">
                <span class="glyphicon glyphicon-hourglass"></span>
                现在的 272 人在排队,累计预约交易成功 7571 次
                <a href="javascript:;">什么叫预约投标</a>
                <a href="javascript:;" class="reverse_now">立即预约</a>
            </div>
            <div class="col-sm-3">
                <span class="glyphicon glyphicon-facetime-video"></span>
                <a href="javascript:;">微金所企业宣传片</a>
            </div>
        </div>
      </div>
      </div>
    <div class="wjs_product clearfix">
      <div class="container">
        <div class="wrap">
         <ul class="nav nav-tabs" role="tablist" >
                <li role="presentation" class="active"><a href="#p1" aria-controls="p1" role="tab" data-toggle="tab">特别推荐</a></li>
                <li role="presentation"><a href="#p2" aria-controls="p2" role="tab" data-toggle="tab">微投资</a></li>
                <li role="presentation"><a href="#p3" aria-controls="p3" role="tab" data-toggle="tab">微小宝</a></li>
                <li role="presentation"><a href="#p4" aria-controls="p4" role="tab" data-toggle="tab">月月盈</a></li>
                <li role="presentation"><a href="#p5" aria-controls="p5" role="tab" data-toggle="tab">稳赢宝</a></li>
                <li role="presentation"><a href="#p6" aria-controls="p6" role="tab" data-toggle="tab">海航通宝</a></li>
                <li role="presentation"><a href="#p7" aria-controls="p7" role="tab" data-toggle="tab">微金宝</a></li>
            </ul>
          </div>
        <div class="tab-content">
          <div role="tabpanel" class="tab-pane active" id="p1">
            <div class="container">
              <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-4" >
                  <div class="wjs_pbox active">
                    <div class="wjs_pLeft">
                     <p>新手体验1002期</p>
                        <div class="row">
                          <div class="col-xs-6">
                            <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                           <div class="col-xs-6">
                             <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                           <div class="col-xs-6">
                             <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                           <div class="col-xs-6">
                             <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                        </div>
                    </div>
                    <div class="wjs_pRight">
                     
                      <b>8</b>
                      <sub>%</sub>
                      <p>年利率</p>
                    </div>
                  </div>
                </div>
                <div class="col-xs-12 col-sm-6 col-md-4" >
                  <div class="wjs_pbox">
                    <div class="wjs_pLeft">
                      <p>新手体验1002期</p>
                        <div class="row">
                          <div class="col-xs-6">
                            <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                           <div class="col-xs-6">
                             <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                           <div class="col-xs-6">
                             <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                           <div class="col-xs-6">
                             <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                        </div>
                    </div>
                    <div class="wjs_pRight">
                       <div class="wjs_tip">
                        <span data-toggle="tooltip" data-placement="top" title="Tooltip on top">宝</span>
                        <span data-toggle="tooltip" data-placement="top" title="Tooltip on top">北</span>
                      </div>
                      <b>8</b>
                      <sub>%</sub>
                      <p>年利率</p>
                    </div>
                  </div>
                </div>
              <div class="col-xs-12 col-sm-6 col-md-4" >
                  <div class="wjs_pbox">
                    <div class="wjs_pLeft">
                      <p>新手体验1002期</p>
                        <div class="row">
                          <div class="col-xs-6">
                             <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                           <div class="col-xs-6">
                             <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                           <div class="col-xs-6">
                             <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                           <div class="col-xs-6">
                             <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                        </div>
                    </div>
                    <div class="wjs_pRight">
                      <b>8</b>
                      <sub>%</sub>
                      <p>年利率</p>
                    </div>
                  </div>
                </div>
              <div class="col-xs-12 col-sm-6 col-md-4" >
                  <div class="wjs_pbox">
                    <div class="wjs_pLeft">
                      <p>新手体验1002期</p>
                        <div class="row">
                          <div class="col-xs-6">
                             <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                           <div class="col-xs-6">
                             <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                           <div class="col-xs-6">
                             <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                           <div class="col-xs-6">
                             <p>起投金额</p>
                            <p>0.01万(元)</p>
                          </div>
                        </div>
                    </div>
                    <div class="wjs_pRight">
                      <b>8</b>
                      <sub>%</sub>
                      <p>年利率</p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div role="tabpanel" class="tab-pane" id="p2">...</div>
          <div role="tabpanel" class="tab-pane" id="p3">...</div>
          <div role="tabpanel" class="tab-pane" id="p4">...</div>
          <div role="tabpanel" class="tab-pane" id="p5">...</div>
          <div role="tabpanel" class="tab-pane" id="p6">...</div>
          <div role="tabpanel" class="tab-pane" id="p7">...</div>
        </div>
       </div>
     </div>
    <div class="wjs_news">
      <div class="container">
        <div  class="row">
          <div class="col-md-2 col-md-offset-2">
            <h3 class="wjs_nTitle">全部新闻</h3>
          </div>
          <div class="col-md-1">
            <div class="wjs_newsLine  hidden-xs hidden-sm"></div>
            <ul class="nav nav-tabs" role="tablist">
             <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab"><span class="glyphicon glyphicon-globe"></span></a></li>
             <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab"><span class="glyphicon glyphicon-tasks"></span></a></li>
             <li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab"><span class="glyphicon glyphicon-bell"></span></a></li>
             <li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab"><span class="glyphicon glyphicon-film"></span></a></li>
             </ul>
          </div>
          <div class="col-md-7">
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane active" id="home">
                  <ul class="wjs_newslist">
                            <li>
                                <a href="">
                                    <span class="hidden-xs">2016-01-22</span>【微公告】关于海航通宝22期项目募集期延长通知
                                </a>
                            </li>
                            <li>
                                <a href="">
                                    <span class="hidden-xs">2016-01-22</span>【微动态】世纪佳缘与百合网的投资人首善财富董事长吴正新一行莅临微金所调研指导
                                </a>
                            </li>
                            <li>
                                <a href="">
                                    <span class="hidden-xs">2016-01-22</span>【微动态】封面人物第六期 ▏万雅泉—— 手写心情的双鱼座美女
                                </a>
                            </li>
                            <li>
                                <a href="">
                                    <span class="hidden-xs">2016-01-22</span>【微公告】2016年7月11日微金所平台系统升级维护公告
                                </a>
                            </li>
                            <li>
                                <a href="">
                                    <span class="hidden-xs">2016-01-22</span>【微动态】微金所与前海航交所携手,正式推出安全优质的理财产品—海航金宝!
                                </a>
                            </li>
                            <li>
                                <a href="">
                                    <span class="hidden-xs">2016-01-22</span>【微动态】微金所七月电脑节,激情狂欢理财好礼送不停!
                                </a>
                            </li>
                            <li>
                                <a href="">
                                    <span class="hidden-xs">2016-01-22</span>【微还款】一周还款公告2016年7月11日-7月17日
                                </a>
                            </li>
                        </ul>
                </div>
                <div role="tabpanel" class="tab-pane" id="profile">...22</div>
                <div role="tabpanel" class="tab-pane" id="messages">..33.</div>
                <div role="tabpanel" class="tab-pane" id="settings">..44.</div>
              </div>
          </div>
        </div>
      </div>
      </div>
    <footer class="wjs_partner">
       <div class="container">
         <h3>合作伙伴</h3>
         <ul>
           <li><span class="glyphicon glyphicon-king"></span></li>
           <li><span class="glyphicon glyphicon-queen"></span></li>
           <li><span class="glyphicon glyphicon-pawn"></span></li>
           <li><span class="glyphicon glyphicon-bishop"></span></li>
           <li><span class="glyphicon glyphicon-knight"></span></li>
           <li><span class="glyphicon glyphicon-knight"></span></li>
           <li><span class="glyphicon glyphicon-knight"></span></li>
           <li><span class="glyphicon glyphicon-baby-formula"></span></li>
           <li><span class="glyphicon glyphicon-tent"></span></li>
          
         </ul>
       </div>
    </footer>
     <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
   <script src="js/iscroll.js"></script>
    <script>
     $(function(){
      $('[data-toggle="tooltip"]').tooltip();
      var items=$(".carousel-inner .item");
      $(window).on("resize",function(){
        var width=$(window).width();
        if(width>=768){
          $(items).each(function(index,value){
            var item=$(this);
            var imgSrc = item.data("largeImage");
            console.log(imgSrc);
            item.html($('<a href="javascript:;" class="pcImg"></a>').css("backgroundImage","url('"+imgSrc+"')"));
          });
        }
        else {
          $(items).each(function(index,value){
           var item = $(this);
           var imgSrc = item.data("smallImage");
           item.html('<a href="javascript:;" class="mobileImg"><img src=" '+imgSrc+'"></a>');
          });
        }
      }).trigger("resize");
      var startX, endX;
      var carousel_inner = $(".carousel-inner")[0];
      var carousel= $(".carousel");
      carousel_inner.addEventListener("touchstart",function(e){
        startX = e.targetTouches[0].clientX;
      });
       carousel_inner.addEventListener("touchend",function(e){
        endX = e.changedTouches[0].clientX;
        if(endX-startX>0){
          carousel.carousel('prev');
        }else {
          carousel.carousel('next');
        }
      });

      });
     var ul=$(".wjs_product .nav-tabs");
     var lis = ul.find("li");
   
     var totalWidth=0;
     lis.each(function(index,value){
      totalWidth = totalWidth+$(value).innerWidth();
    
     });
     ul.width(totalWidth);
     var myScroll = new IScroll (".wrap",{
      scrollX:true,scrollY: false
     });

     </script>
  </body>
      </html>
      @baseColor:#e92322;
.wjs_header{
	height: 50px;
	line-height: 50px;
	border-bottom: 1px solid #ccc;
	.row{
	   height: 100%;
	   text-align: 50px;
	   >div:nth-of-type(-n+3){
	     border-right: 1px solid #ccc;
	     >.wjs_code{
	         position: relative;
	         display: block;
	         >img{
	          display:none;
	          position:absolute;
	          top: 49px;
	          left: 50%;
	          transform:translateX(-50%);
	          border: 1px solid #ccc;
	          border-top: 0;
	          z-index: 22;

	          }
	       &:hover{
	         >img{
	         display: block;
	         }
	       }
	   
	   }
	 }
	 >div:nth-last-of-type(1){
          >.btn-danger{
          background-color: @baseColor;
          border-color: @baseColor;  
          }
          >.btn{
          padding: 3px 15px;
          }
          > .btn-link {
           color: #222;
           &:hover{
           text-decoration: none;
           }
          }

	    }
   }
}
.wjs_nav {
    &.navbar {
    margin-bottom: 0;
    }
	.navbar-brand{
	height: 80px;
	line-height: 50px;
	 > .wjs_icon{
      font-size: 35px;
      font-weight: 600;
	}
	> span:first-of-type{
	  color: @baseColor;
	}
	> span:last-of-type{
	  color: #333;
	}
	}
	.navbar-nav {
	> li{
      > a {
        line-height: 50px;
        font-size: 16px;
      }
      > a:hover,a:focus {
      color: #777;
      border-bottom: 3px solid @baseColor;
      }
	 }
	.active  {
	 > a,a:hover,a:focus{
	 background-color: transparent;
	 border-bottom: 3px solid @baseColor;
	 }
	}
	}
	.navbar-toggle {
	margin-top: 23px;
	}

}
.wjs_info{
    padding: 30px;
	.wjs_icon{
	font-size: 30px;
	}
	.row {
	> div {
	  margin-top: 20px;
	  a:hover {
	  color: @baseColor;
	  }
	}
	}
}
.wjs_reverse {
	height: 60px;
	line-height: 60px;
	border-top: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
	.glyphicon {
	font-size:18px;
	}
	.reverse_now {
	color: @baseColor;
	border-bottom:1px dashed @baseColor;
	}
	a:hover{
	color: @baseColor;
	}
}
.wjs_product {
	background-color: #eee;
	padding: 20px;
	.wrap {
	width: 100%;
	overflow: hidden;
	}
	.nav-tabs{
	>li {
	margin-bottom: 0px;
	padding: 0px 15px;
	> a {
	line-height: 50px;
	border: 0;
	background-color: #eee;
	}
	> a:hover {
	border-bottom:3px solid @baseColor;
	}
	&.active{
	>a,a:hover,a:focus{
	border: 0;
	background-color: #eee;
	border-bottom:3px solid @baseColor;
	  }
	  }
	 }
	}
	.wjs_pbox {
	height: 150px;
	margin-top: 20px;
	background-color: #fff;
	.wjs_pLeft {
	 margin-right: 100px;
	 height: 150px;
	 padding-top: 10px;
	 > p{
	 text-align: center;
	 }
	 .row {
	 margin-left: -10px;
	 margin-right: -10px;
	 > div:nth-of-type(even){
	 text-align: right;
	 }
	 }
	}
	.wjs_pRight {
	width: 100px;
	height: 150px;
	position: absolute;
	right: 15px;
	top: 20px;
	border-left: 1px dashed #ccc;
	text-align: center;
	padding-top: 30px;
	> .wjs_tip {
	width:100%;
	position: absolute;
	left:50%;
	top: 20px;
	transform: translateX(-50%);
	> span {
	cursor: pointer;
	}
	>span:first-of-type{
	color: red;
	border:1px solid red;
	}
	>span:last-of-type{
	color: blue;
	border:1px solid blue;
	}
	}
	> b{
	font-size: 40px;
	color: @baseColor;
	}
	>sub {
	 color: @baseColor;
	 bottom: 0;
	}
	&::before,&::after{
	content:'';
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: #eee;
	position: absolute;
	left: -5px;
	}
	&::before {
	top: -5px;
	box-shadow: 0px -1px 1px #ddd insert;
	}
	&::after {
	bottom: -5px;
	box-shadow: 0px 1px 1px #ddd insert;
	}
	}
	
	&.active {
	background-color: red;
	> .wjs_pRight {
	 >b,sub,p{
	  color: #fff;
	 }
	}
	> .wjs_pLeft {
	 color: #fff;
	}
	}
}
}
.wjs_news{
padding: 20px;
   .wjs_newsLine {
    width: 1px;
    height: 100%;
    position: absolute;
    border-left: 1px dashed @baseColor;
    left: 45px;
    top: 0;
   }
	.wjs_nTitle{
	line-height:50px;
	font-size: 25px;
	border-bottom: 1px solid  #ccc;
	text-align: center;
	position: relative;
	&::before {
	content:'';
	width: 8px;
	height: 8px;
	border-radius: 4px;
	border: 1px solid #ccc;
	position: absolute;
	bottom: -4px;
	right: -8px;
	}
	}
	.nav-tabs{
	border-bottom: 0;
	>li{
	margin-bottom: 60px;
	>a {
	padding: 12px 12px;
	background-color: #ccc;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: none;
	}
	> a:hover{
	background-color: @baseColor;
	}
	&.active {
	> a,a:hover,a:focus{
	background-color: @baseColor;
	}
	}
     .glyphicon{
       font-size: 35px;
       color: #fff;

     }
	}
	>li:last-of-type{
	 margin-bottom: 0;
	}
	@media screen and (min-width:768px) and (max-width: 992px){
	>li{
	margin: 20px 30px;
	}
	}
	@media screen and (max-width: 768px){
	>li{
	margin: 20px 0;
	width: 25%;

	}
	}

	}
	.wjs_newslist {
	>li {
	height: 60px;
	}
	}
}
.wjs_partner {
	background-color: #eee;
	paddding: 20px;
	text-align: center;
	h3{
	text-align: center;
	}
	ul{

	display:inline-block;
	>li {
    margin-top: 20px;
	float: left;
	margin-left: 20px;
	}
	}
	.glyphicon {
	font-size: 80px;
	}
}

转载自原文链接, 如需删除请联系管理员。

原文链接:响应式开发 微金所项目,转载请注明来源!

0