Permalink
Browse files

fix: show mobile slider on PC | 边栏点击展开

  • Loading branch information...
1 parent f9fbf55 commit fd08519060a741640db6045998ed4ae74f8d80cc @MOxFIVE committed May 19, 2016
Showing with 19 additions and 7 deletions.
  1. +11 −6 source/css/_partial/mobile-slider.styl
  2. +1 −1 source/js/main.js
  3. +7 −0 source/js/mobile.js
@@ -8,6 +8,7 @@
overflow: hidden;
}
#viewer-box{
+ display: flex;
width: 100%;
height: 100%;
position: relative;
@@ -17,8 +18,9 @@
.viewer-box-l{
background: rgba(20,20,20,0.9);
width: 80%;
- height: 100%;
- float: left;
+ height: auto;
+ flex-grow: 0;
+ min-width: 8em;
max-width: 23em;
.viewer-box-wrap{
margin: 20px 10px 0px 20px;
@@ -50,10 +52,13 @@
}
}
.viewer-box-r{
- background: rgba(0,0,0,0);
- width: 20%;
- height: 100%;
- float: right;
+ flex-grow: 1
+ width: auto
+ height: auto
+ background: rgba(0,0,0,0)
+ &:hover {
+ cursor: w-resize
+ }
}
}
#viewer-box.anm-swipe{
View
@@ -47,7 +47,7 @@ require([], function (){
}
});
- if(browser.versions.mobile === true || $(window).width() < 700){
+ if(browser.versions.mobile === true || $(window).width() < 800){
loadMobile();
}else{
loadPC();
View
@@ -111,6 +111,13 @@ define([], function(){
touchEndTime = 0;
}, false);
+ $(".slider-trigger").click(function(){
+ show();
+ })
+ $(".viewer-box-r").click(function(){
+ hide();
+ })
+
//滚动样式
var $overlay = $("#mobile-nav .overlay");
var $header = $(".js-mobile-header");

0 comments on commit fd08519

Please sign in to comment.