Computational Media




Week 7 - The DOM 

@KEYFRAME???

I couldn’t figure out the animate() function and it drived me crazy. Below, you can find several websites that I used to figure this problem out (but failed):


I’m 100% sure that I’m missing out an incredibly small detail. If I understand it correctly, we are suppose to declare a @keyframe and define our animation inside this function/class. But, where do I write this?

Therefore, I could only make a static image rather than a dynamic one. Click here to see the results.




<style>
p {
padding: 25px;
border: solid 20px red;
background-color: green;
color:
}
</style> 

There is a small area above the first image as if there is a white box. Before there was my grey canvas. To solve this, I deleted createCanvas(); and background(); in my p5.js sketch. Even though the canvas turned white, the first image stayed still. I wanted it to start at (0,0) but couldn’t manage to do that. How can I solve this?

WRITE YOUR ANSWER INTO THE INPUT FIELD

For the second question, I created an input field where the text the user types is displayed both into the canvas and the paragraph. When I enter my answer, everything disappears. I’m not sure how it’s possible. 

To try writing and answer and submiting it, click here!

   

Also, how can I move my input field below my button?





















































































 
Lipsum™
Integer turpis massa, varius ultricies est sed, aliquet feugiat enim. Nulla facilisi. Ut in justo in ex faucibus ultricies. Proin id erat quis lorem vehicula commodo. Phasellus pharetra libero pretium ultricies aliquam. Vivamus eleifend, ligula ut venenatis aliquet, massa elit efficitur lorem, fermentum molestie elit ligula in ex. Duis mauris tellus, pharetra et orci a, aliquam imperdiet augue. Pellentesque elit neque, tincidunt sit amet imperdiet eget, porta ut metus. Nulla id leo tortor. Donec elementum ac sapien eget feugiat. Donec lorem dui, vestibulum quis nisl et, feugiat mattis massa.


Phasellus Rez

Praese
Suspendía

Lipsum Deus

  1. Praese Vita
  2. Nulla Vehicu AI
  3. Ukam Cors
  4. Dictum Magna
  5. Cursus Ex
  6. Suspendis Est
  7. Facili Sap
  8. Et Magni Disc
  9. Phasellus Deus
  10. Deus
  11. Rexus
  12. Maximus
  13. Lorem Ipsum
  14. Dolor 123




©MMXXI
Integer turpis massa varius