Share Posted February 26, 2016 Hi, if i include a simple html tag like <b> in my TextPlugin command, like this ...: TweenLite.to(yourElement, 2, {text:"This is the <br>new</b> text", ease:Linear.easeNone}); the "new" text will be displayed bold, BUT for a short period of time the <b> and </b> tag is visible (before it disappears). Is there a way to make html tags NOT be visible? Thank you! Link to comment Share on other sites More sharing options...
Share Posted February 26, 2016 Sorry, the TextPlugin does not support nested html tags like <b>, <strong>, <em> etc. It only works on straight text. You can create two text elements and tween them separately like so: var tl = new TimelineLite(); tl.to("span.normal", 1, {text:"welcome to the "}) .to("span.bold", 1, {text:"BOLD TEXT "}) .timeScale(2); http://codepen.io/GreenSock/pen/jqONRV?editors=1010 4 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now