Home  >  Q&A  >  body text

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

代码部分

<template>
    <p 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>
     </p>
</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>
PHP中文网PHP中文网2765 days ago629

reply all(1)I'll reply

  • 迷茫

    迷茫2017-04-17 11:57:55

    Already solved it by myself.

    reply
    0
  • Cancelreply