Skip to content

Commit

Permalink
Revert "增加媒体查询,在ipad下居中显示"
Browse files Browse the repository at this point in the history
This reverts commit 3fecf31.
  • Loading branch information
onlyhom committed Dec 16, 2017
1 parent 3fecf31 commit b26af14
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 63 deletions.
18 changes: 0 additions & 18 deletions css/mobileSelect.css
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,3 @@
.mobileSelect-show .content {
bottom: 0;
}
@media screen and (min-width: 768px) {
.mobileSelect .content {
width: 60%;
left: 20%;
bottom: 50%;
border-radius: 10px;
-moz-transform: scale(0.4);
-o-transform: scale(0.4);
-webkit-transform: scale(0.4);
transform: scale(0.4);
}
.mobileSelect-show .content {
-moz-transform: scale(1);
-o-transform: scale(1);
-webkit-transform: scale(1);
transform: scale(1);
}
}
25 changes: 1 addition & 24 deletions css/mobileSelect.less
Original file line number Diff line number Diff line change
Expand Up @@ -155,27 +155,4 @@
.content{
bottom: 0;
}
}

@media screen and (min-width: 768px) {
.mobileSelect{
.content{
width: 60%;
left:20%;
bottom: 50%;
border-radius: 10px;
-moz-transform:scale(0.4);
-o-transform:scale(0.4);
-webkit-transform:scale(0.4);
transform:scale(0.4);
}
}
.mobileSelect-show{
.content{
-moz-transform:scale(1);
-o-transform:scale(1);
-webkit-transform:scale(1);
transform:scale(1);
}
}
}
}
45 changes: 24 additions & 21 deletions demo.html
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="wap-font-scale" content="no">
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1,user-scalable=no">
<meta name="keywords" content="">
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="css/public.css">

Expand Down Expand Up @@ -63,22 +63,22 @@ <h1>mobileSelect Demo</h1>
id:'1',
value:'标准版'
},
{
{
id:'2',
value:'加长版'
},
{
{
id:'3',
value:'巅峰之旅'
},
{
{
id:'4',
value:'流光熠世'
},
{
{
id:'5',
value:'都会典藏版'
}
}
]
},
{
Expand All @@ -93,11 +93,11 @@ <h1>mobileSelect Demo</h1>
id:'2',
value:'永恒之爱'
},
{
{
id:'3',
value:'英骥'
},
{
{
id:'4',
value:'阿尔卑斯典藏版'
}
Expand Down Expand Up @@ -137,7 +137,7 @@ <h1>mobileSelect Demo</h1>
}
]
},
{
{
id:'2',
value:'欧陆',
childs:[
Expand Down Expand Up @@ -216,21 +216,21 @@ <h1>mobileSelect Demo</h1>
* @function updateWheel() 参数 sliderIndex, data 重新渲染指定的轮子(可用于先实例化,后通过ajax获取数据的场景)
* @function updateWheels() 参数 data 重新渲染所有轮子,仅限级联数据格式使用(可用于先实例化,后通过ajax获取数据的场景)
* @function locatePosition() 参数 sliderIndex, posIndex 传入位置数组,重定位轮子的位置
* @function show() 参数 无参 唤起弹窗组件
* @function getValue() 参数 无参 获取组件选择的值
* @function show() 参数 无参 唤起弹窗组件
* @function getValue() 参数 无参 获取组件选择的值
*/



var mobileSelect1 = new MobileSelect({
trigger: '#trigger1',
title: '单项选择',
trigger: '#trigger1',
title: '单项选择',
wheels: [
{data: weekdayArr}
],
position:[2], //初始化定位 打开时默认选中的哪个 如果不填默认为0
transitionEnd:function(indexArr, data){
//console.log(data);
console.log(data);
},
callback:function(indexArr, data){
console.log(data);
Expand All @@ -247,7 +247,7 @@ <h1>mobileSelect Demo</h1>
],
position:[1, 2],
transitionEnd:function(indexArr, data){
//console.log(data);
console.log(data);
},
callback:function(indexArr, data){
console.log(data);
Expand All @@ -265,9 +265,9 @@ <h1>mobileSelect Demo</h1>
{data: numArr},
{data: numArr}
],
position:[0, 1, 0, 1, 0],
position:[0, 1, 0, 1, 0],
transitionEnd:function(indexArr, data){
//console.log(data);
console.log(data);
},
callback:function(indexArr, data){
console.log(data);
Expand Down Expand Up @@ -299,11 +299,11 @@ <h1>mobileSelect Demo</h1>
]}
],
transitionEnd:function(indexArr, data){
//console.log(data);
console.log(data);
},
callback:function(indexArr, data){
console.log(data);
}
}
});


Expand All @@ -315,10 +315,13 @@ <h1>mobileSelect Demo</h1>
],
position: [2,0],
transitionEnd:function(indexArr, data){
//console.log(data);
console.log(data);
},
callback:function(indexArr, data){
console.log(data);
},
cancel: function(pa1, pa2){
console.log(pa1, pa2);
}
});

Expand Down

0 comments on commit b26af14

Please sign in to comment.