Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
984 views
in Technique[技术] by (71.8m points)

如何使用 vue transition 实现 ios 按钮一样的平滑切换效果

图片描述

代码部分

<template>
    <div class="register__user-wrapper font-size-default border-box relative">
    /* register__user-active 表示当前页面激活的 a 标签 */
        <a class="register__user register__user-active absolute" id="register__personal-user">个人用户</a>
        <a class="register__user absolute right-0" id="register__enterprise-user">企业用户</a>
     </div>
</template>
<style>
.register__user-wrapper {
    width: 100%;
    height: 57px;
    margin-bottom: 31px;
    border-radius: 8px;
    padding: 3px;
    background-color: #ededed;
 }
  .register__user {
    width: 212px;
    height: 51px;
    line-height: 51px;
    border-radius: 8px;
    text-align: center;
    background-color: transparent;
    color: #4c4c4c;
 }
  .register__user-active {
    background-color: #fff;
    cursor: pointer;
 }
</style>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

已经自己解决了。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...