javascript - ionic modal 动画无效
怪我咯
怪我咯 2017-04-10 15:35:16
[JavaScript讨论组]

有的人说需要引入css,我也引用了,结果还是不行,求助于各位

js

$ionicModal.fromTemplateUrl('tpl/detail.html', {
        scope: $scope,
        animation:'slide-in-up'
    }).then(function(modal) {
        $scope.modal = modal;
    });
    $scope.openModal = function(id) {
        $scope.detail=$scope.data.list[id];
        $ionicScrollDelegate.$getByHandle('detail').scrollTop();
        $scope.modal.show();
    };
    $scope.closeModal = function() {
        $scope.modal.hide({animation:'slide-in-left'});
    };
    //Cleanup the modal when we're done with it!
    $scope.$on('$destroy', function() {
        $scope.modal.remove();
    });
    // Execute action on hide modal
    $scope.$on('modal.hidden', function() {
        // Execute action
    });
    // Execute action on remove modal
    $scope.$on('modal.removed', function() {
        // Execute action
    });

css

@-webkit-keyframes slideInUp {
  0% {
    -webkit-transform: translate3d(100%, 0%, 0);
    -moz-transform: translate3d(100%, 0%, 0);
    transform: translate3d(100%, 0%, 0);
    opacity: 1; }

  100% {
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1; } }
怪我咯
怪我咯

走同样的路,发现不同的人生

全部回复(1)
天蓬老师

需要把template的内容放在他固定的容器里面

<ion-modal-view></ion-modal-view>

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号