• CSS过渡、CSS动画


    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="utf-8"/>
            <script src="vue.js"></script>
        </head>
        <body>
            <div>
            <h1>--CSS过渡--</h1>
            <div id="example1">
                <button @click="show = !show">Toggle render</button>
                <transition name="slide-fade">
                    <p v-if="show">hello</p>
                </transition>
            </div>
            <script>
            // Vue 根实例
            var example1 = new Vue({
                el: '#example1',
                data: {
                    show: true
                }
            })
            </script>
            <style>
                .slide-fade-enter-active {
                    transition: all .3s ease;
                }
                .slide-fade-leave-active {
                    transition: all .8s cubic-bezier(1.0, 0.5, 0.8, 1.0);
                }
                .slide-fade-enter, .slide-fade-leave-to {
                    transform: translateX(10px);
                    opacity: 0;
                }
            </style>
            </div>
            <div>
            <h1>--CSS动画--</h1>
            <div id="example2">
                <button @click="show = !show">Toggle show</button>
                <transition name="bounce">
                    <p v-if="show">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris facilisis enim libero, at lacinia diam fermentum id. Pellentesque habitant morbi tristique senectus et netus.</p>
                </transition>
            </div>
            <script>
            // Vue 根实例
            var example2 = new Vue({
                el: '#example2',
                data: {
                    show: true
                }
            })
            </script>
            <style>
                .bounce-enter-active {
                    animation: bounce-in .5s;
                }
                .bounce-leave-active {
                    animation: bounce-in .5s reverse;
                }
                @keyframes bounce-in {
                    0% {
                        transform: scale(0);
                    }
                    50% {
                        transform:scale(1.5);
                    }
                    100% {
                        transform:scale(1);
                    }
                }
            </style>
            </div>            
        </body>
    </html>

    运行效果图:

  • 相关阅读:
    Summarizing NUMA Scheduling两篇文章,解释得不错
    VCAP5-DCA – What’s new?
    NUMA总结。
    NUMA and vNUMA
    NUMA
    vsphere 5.1 性能最佳实践。
    vsphere性能
    mysql的事务,隔离级别和锁
    mysql5.7 生成列 generated column
    mysql8 公用表表达式CTE的使用
  • 原文地址:https://www.cnblogs.com/gongshunfeng91/p/11319807.html
Copyright © 2020-2023  润新知