//css .v-d{ width:50px; height:50px; padding:10px; transition: all 0.4s linear } .v-d .in{ width:30px; height:30px; background:#000; transition: all 0.4s linear } .move-enter-active, .move-leave-active{ transition: all 0.4s linear } .move-enter, .move-leave-active{ opacity: 0; transform: translateX(30px); } .move-enter, .move-leave-active .in{ transform: rotate(45deg) }
//js window.onload = function(){ new Vue({ el: '#demo', data: { show: false } }) }
运行代码后发现这个类名的过渡:
.move-enter, .move-leave-active .in{ transform: rotate(180deg) }
没起作用,我开始以为这种嵌套的写法不支持,但是后来经过多次尝试后发现,原来transition 应用的类名不能和基本样的类名一样,也就是.in这个类必须换名才能起作用,所以在改动下面代码:
.move-enter, .move-leave-active .in_move{ transform: rotate(180deg) }
看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注创新互联网站建设公司行业资讯频道,感谢您对创新互联建站的支持。
另外有需要云服务器可以了解下创新互联建站www.cdcxhl.com,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、建站服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
售后响应及时
7×24小时客服热线数据备份
更安全、更高效、更稳定价格公道精准
项目经理精准报价不弄虚作假合作无风险
重合同讲信誉,无效全额退款