Jump to content
Search Community

BoxShadow Effects

_d3CipH3R_ test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I've tried adding the effects from the following web page: http://www.greensock.com/css3/

Under the section boxShadow

I've noticed the target: greenPulse

As well as another target: bsBox5

Do both the targets refer to the same element/reference or are they different?

I've tried using this feature, but I keep getting the error that 'TweenMax is not defined'.

I will upload a code snippet on codepen if needed.

Link to comment
Share on other sites

Hello _d3CipH3R_, and Welcome to the GreenSock Forums!

 

I tried your link from your 2nd post above and it goes to a codepen NOT FOUND page.

 

Regarding your questions in your 1st post above:

 

if you look at the element being animated in the browser inspector:

<div style="margin-top: 25px;" class="bsClipBox" id="bsBox5">green pulse</div>

You can see that the same bsBox5 references the id #bsBox5 which has a to() tween, which animates the elements background to black

 

greenPulse refers to the same element because the box-shadow is being applied on that element as well. You can see this if you inspect the element using the browsers Developer Tools. And then hover over the element and to see the CSS styles on the element change.

 

This is what the element looks like with the background and box-shadow on the element:

<div style="margin-top: 25px; box-shadow: 0px 0px 0px 0px rgb(0, 0, 0); background-color: rgb(85, 85, 85);" class="bsClipBox" id="bsBox5">green pulse</div>

Notice the style attribute on the element? When looking a the element in the inspector you can see how the box-shadow is being animated, by how the inline style has the box-shadow in there with its values updating.

 

Does that help?

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...