小编Ash*_*utt的帖子

如何通过javascript更改标题的边距

我想通过 javascript 更改我的 h1 边距,但它不起作用

我的代码:

<script>
  document.getElementById("h1").style.marginLeft = "250px";
</script>

<h1 id="h1" style="position: absolute; text-align: center; top: 100px;  color: #E95928;  font-family:Helvetica; font-weight: bold; font-size:6vw; ">Shop till<br>you drop</h1>
Run Code Online (Sandbox Code Playgroud)

html javascript

0
推荐指数
1
解决办法
31
查看次数

标签 统计

html ×1

javascript ×1