【发布时间】:2021-07-26 11:22:12
【问题描述】:
我对 javascript 以及如何使这个数字上升感到非常困惑,如果你能告诉我它有多棒的话。 (我对 javascript 有点陌生,如果这没有意义,请在 cmets 中告诉我是否应该提供更多信息,但那里的代码就是全部内容)
代码
<head>
<div class="center">
<h1 id="title">
This number will increase.
</h1>
<p id="button">
0
</p>
<a
class="button"
style="text-decoration: none; color: black; font-family: calibri;"
id="numbergoup"
onclick="myFunction()"
>Number go up</a
>
</div>
<script>
function myFunction() {
}
</script>
<style>
#button {
border-style: solid;
padding: 20px;
}
div.center {
text-align: center;
}
#numbergoup {
background-color: tomato;
padding: 20px;
position: absolute;
top: 20%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
</style>
</head>
</html>```
【问题讨论】:
标签: javascript html css numbers var