ICM: Week 7 – DOM

This week we learned about DOM elements.  For inspiration I used Moon’s workshop example.

Moving Triangle from Lindsey Frances on Vimeo.

After manipulating it a little, I created what looks like abstract butterflies.  Then I added some sliders and buttons to change the colors.  I tried to create a slider to change the amount of “butterflies” but found that since that for loop was in the setup, I couldn’t get it to work.  Would I have to make another function in order to do this?

Butterflies from Lindsey Frances on Vimeo.

Questions:

  • Is there a reason it is more useful to put HTML and CSS elements in the Javascript file than having them in their own individual files?
  • Is there a way to have font from an HTML element put behind an JS element?
  • Can the font style be put together in one style function rather than multiple lines?

Leave a Reply

Your email address will not be published. Required fields are marked *