Answer the question
In order to leave comments, you need to log in
Why does innerHtml return undefined?
Hello. I'm learning js, I'm making a countdown timer until a certain date. It is necessary to substitute 0 for numbers if one is unambiguous. I put it in like this:
function formatTime(time) {
if (time < 10){
time = '0'+time;
}
result =time;
}
var sec = document.querySelector('#sec');
sec.innerHTML = formatTime(secondsNumber);;
Answer the question
In order to leave comments, you need to log in
All in one picture is not universal, especially since it is not difficult to make up.
The first example is one circle with a gradient, the second is white, on top.
The second example is the same circle with a gradient, and overlap half of it. In my opinion, options with a large number of border-radii can break the brain, but here the taste and color ...
The semicircle is very easy to do with pure css:
.radius {
display: block;
width: 50px; /* ширина в два раза меньше высоты, иначе получится полуовал */
height: 100px;
border-radius: 0 100% 100% 0 / 0 50% 50% 0;
background: linear-gradient( rgb(101,220,167) 0%, rgb(53,112,94) 100%)
}
result =time;
// replace to
return time;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question