How to add transformation on top of already existing ones in JS plugins

问题: I am using the plugin arctype.js which allows for you to curve text on the page. However, it uses transformations and now I am unable to add any other transform effects usi...

问题:

I am using the plugin arctype.js which allows for you to curve text on the page. However, it uses transformations and now I am unable to add any other transform effects using css transform. Here is the code that I tried:

<center><h2 id = "days" class = "numbers">1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 </h2></center>

 <style> 
    .numbers .char1{
        transform: translate(0px, 0);
        transition: -webkit-transform 0.8s ease;
    }

    .numbers .char1:hover{
      transform: scale(0.7);

    }
<style>

回答1:

In order to override the plugin's css and make sure that your style declarations always gets most priority you can use !important

.classname {
 transform: scale(0.7) !important;
}
  • 发表于 2019-03-10 23:56
  • 阅读 ( 62 )
  • 分类:sof

条评论

请先 登录 后评论
不写代码的码农
小编

篇文章

作家榜 »

  1. 小编 文章
返回顶部
部分文章转自于网络,若有侵权请联系我们删除