orzubalsky / creative-computing-2018

0 stars 1 forks source link

Nothing showing up when editing js #114

Open bajrushivlora opened 6 years ago

bajrushivlora commented 6 years ago

I don't know why, but ive tried to edit my JS and nothing is showing up on the page when i drag the HTML of my verb_03 into Chrome. Here's my code so far:

var container = document.querySelector(".content");

for (var i = 0; i < 4; i++) {

var shape = document.createElement('div');
shape.classList.add('shape');
shape.style.border = 'black';
container.append(shape);

}

I have four shapes in my composition, and I want to make the borders black. When i refresh the page, it's just a blank empty page, im not sure why ?!

gallm551 commented 6 years ago

I'm a little confused, but I think the black that you put under the JS might be messing you up? Try putting that under your class/div in CSS.

Here's a CSS example:

.shape {
  width: 100px;
  height: 85px;
  border:5px solid;
  border-radius: 10px;
  display: inline-block;
  **color: mistyrose;
  background-color: darkseagreen;**
  transition: all 2s;
  animation-name: scaledown;
  animation-duration: 1s;
  animation-direction: alternate-reverse;
  animation-iteration-count: infinite; 
}

I might be wrong, but good luck!!