首页 > Web开发 > 详细

vue3.0 动态css变量的使用

时间:2021-07-08 09:58:28      阅读:117      评论:0      收藏:0      [点我收藏+]
setup() {
    const rotate = ref<number>(0);
    const color: string = "red";
    const changeStatus = (): void => {
      rotate.value = -90;
    };

    return {
      rotate,
      color,
    };
  },

<style>
.test {
   color: v-bind(color);
   transform: rotateX(calc(v-bind(rotate) * 1deg))
}
</style>

vue3.0 动态css变量的使用

原文:https://www.cnblogs.com/anans/p/14984078.html

(0)
(0)
   
举报
评论 一句话评论(0
分享档案
最新文章
教程昨日排行
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!