Jump to content
Search Community

Lichay

Members
  • Posts

    159
  • Joined

  • Last visited

Posts posted by Lichay

  1. 21 minutes ago, ZachSaucier said:

    How about you share your pen with us?

     

    It does support Angular 9. 

    code pen it regular html css and javascript i don't use them i use framework and it don't work  if i share with codepen it maybe work but so .. ? it bad .

    everyone use framworks like me .

    and with framwork this plug don't work as 'before' and 'after' like i said above 

  2. 2 minutes ago, GreenSock said:

    I wish I could help, but without a reduced test case I'm afraid I can't do much. I have nothing to look at. Maybe it's a loading order thing, like your CSS isn't parsed by the browser yet? Very difficult for me to know. 

    do you want my git link?

  3. 17 minutes ago, GreenSock said:

    It sounds like there is no ".cc::before" rule. Did you try to console.log(rule) before the tween? 

     

    Also, this is not valid: 

    
    gsap.to(rule, 3, { cssRule: { color: "#0000FF", x: 50 }, x: 300 });

    You're telling the rule to animate x to 50....and you're ALSO telling GSAP to try to animate an "x" property directly on the rule object itself to 300 (without the help of CSSRulePlugin). I assume you didn't mean to leave that "x: 300" in that tween, right? 

     

    If you still need help, please provide a reduced test case (not just sample code). It's very difficult to troubleshoot blind, that's all. We have to guess at what else is going on in your project, what the context is like, etc. CodePen or codesandbox or something like that would be much better. Thanks!

    why not I have a class with name cc 

    when i log in it say "undefined" for no reason 

  4. when I try to use gsap with pursue element it not recognize

     

    that my ts

    import { Component, OnInit } from '@angular/core';
    
    
    import { gsap } from "gsap";
    import { CSSRulePlugin } from "gsap/CSSRulePlugin";
    import { ScrollTrigger } from "gsap/ScrollTrigger";
    
    
    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
    })
    export class AppComponent implements OnInit {
      title = 'gsapProject';
    
      ngOnInit() {
    
        gsap.registerPlugin(CSSRulePlugin, ScrollTrigger);
    
        gsap.from('div h1', {
          scrollTrigger: 'div h1',
          y: 200,
          duration: 5
        });
    
        const rule = CSSRulePlugin.getRule('.cc::before');
        gsap.to(rule, 3, { cssRule: { color: "#0000FF", x: 50 }, x: 300 });
    
      }
    
    }

    and this my HTML 

    <div>
    
      <h1 class="cc">new project</h1>
    
    </div>

     

    Just try it with a new project for be clear and don't work .

    This my message from the page 

    gsap-core.js:87 GSAP target undefined not found. https://greensock.com

     

    feel like no way to do it.

     

×
×
  • Create New...