样式修改

<html>
<head>

</head>

<body>
    <div id="show">
    </div>
    <div class="article">
        <p class="article-1">段落1</p>
        <p class="article-2">段落2</p>

    </div>

    <img src="" alt="">


</body>
<script>
    var article = document.querySelectorAll(".article-1");
    console.log(articles);
    console.log(articles[0]);
    console.log(articles[1]);
    articles[0].style.color = "red";
    articles[0].style.fontSize = "30px";

    articles[1].style.fontSize = "30px";

    var get_imgs = document.getElementsByTagName("img")
    
</script>

</html>

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容