safari(css,jquery)仿iosNative的actionsheet
来源:互联网 发布:java.io jar包下载 编辑:程序博客网 时间:2024/06/06 07:46
先上效果图
html代码:
<div id="actionsheet" class="actionsheet hidden"> <div class="actionchoices"> <div class="fieldset"> <div>工作时间:每天9:00-22:00</div> <a href="tel:4006892227" class="caution">呼叫 400-689-2227</a> </div> <a href="javascript:void(0);" ng-click="hideActionSheet()" class="redButton dismiss">取消</a> </div> </div>
css代码:
.actionsheet{ position: fixed; top: 0; left: 0; right: 0; bottom:0; background: #333; opacity: 0.85; z-index: 1001;}.actionchoices{ z-index: 1002; border-radius: 2%; position: fixed; width: 100%; bottom: -50%; left: 50%; margin-left: -50%;}div.fieldset div{ display: block; font-weight: normal; margin: 0 8px 0 8px; text-align: center; text-decoration: inherit; background-image: none; background-color: rgba(255, 255, 255, 0.95); color: #777; text-shadow: none; font-size: 1em; line-height: 1.7em; padding: 15px 15px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom: 1px solid #e6e6e6;}div.fieldset a{ border-radius: 0; margin: 0 8px 0 8px; font-size: 20px; color: #007aff; line-height: 44px; border: 0 solid transparent; border-bottom: 1px solid #e6e6e6; background-color: rgba(255,255,255,.95); font-weight: 400; padding: 0; text-shadow: none; display: block; text-align: center; text-decoration: inherit; -webkit-tap-highlight-color: transparent; -webkit-user-drag: none; cursor: auto;}div.fieldset a.caution{ color: #fd472a; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px;}div.fieldset+a{ margin-bottom: 0; border: none; background-color: #f4f4f4; color: #007aff; margin: 8px 8px 0 8px; border-radius: 4px; font-size: 20px; line-height: 44px; padding: 0; text-shadow: none; display: block; text-align: center; text-decoration: inherit; -webkit-tap-highlight-color: transparent; -webkit-user-drag: none;}
jquery控制显示(用了angularjs)
$scope.showActionSheet = function(){ $('#actionsheet').removeClass('hidden'); setTimeout(function(){ console.log('show'); $('#actionsheet .actionchoices').animate({bottom:"2%"},'fast'); },100); } $scope.hideActionSheet = function(){ $('#actionsheet .actionchoices').animate({bottom:"-50%"},'fast'); setTimeout(function(){ $('#actionsheet').addClass('hidden'); },100); }
0 0
- safari(css,jquery)仿iosNative的actionsheet
- 自定义仿iOS的ActionSheet底部Dialog的样式
- AndroidUi 高仿IOS ActionSheet
- 仿qq弹出列表的actionSheet用oc ,swift2和安卓的简单实现
- iOS开发用Tableview实现能改变字体颜色的高仿系统的ActionSheet
- Android开发技巧——使用Dialog实现仿QQ的ActionSheet菜单
- 仿IOS 菜单 ActionSheet Menu For Android
- 仿jQuery的oop
- CSS+jQuery 下拉菜单(仿select)
- [ios]自定义的ActionSheet
- actionSheet imageView的边界
- ActionSheet
- ActionSheet
- safari css hack
- Ios精品源码,扁平化的ActionSheet仿花椒截屏demo文件签名重叠卡片滚动汽车仪表盘
- IE6、IE7与Firefox、Safari的CSS兼容小结
- 禁止选择文本的css(chrome,safari,firefox等)
- 移动设备safari不支持jquery的live绑定的解决办法
- java中集合的接口和类
- 手机开发实战18——GPRS移动台分类
- 关于byte储存-128的问题
- pthread_exit()
- Android 撕开美女衣服解析
- safari(css,jquery)仿iosNative的actionsheet
- java注解学习2,注解的定义与反射调用
- 部分排序算法python实现
- django教程:django后台很巧妙的技巧
- 深入理解枚举类型之基础用法
- APP开发实战19-TCP和HTTP连接
- java内存模型与线程
- VC中给列表控件CListCtrl添加复选框
- Impala手动安装