如何删除在body class下包含文本的“ div样式”?

我尝试过CSS,但可能做错了

<body class="home page page-id-14 page-template page-template-100-width page-template-100-width-php logged-in admin-bar no-customize-support fusion-body no-tablet-sticky-header no-mobile-sticky-header no-mobile-slidingbar no-mobile-totop layout-wide-mode mobile-menu-design-classic" data-spy="scroll">

    <div style="position: absolute; top: 0px; left: -3434px;">
        Find the latest ***** available across a*******sites
        <a target="_blank"href="http://www.website.zone/">
            Site.Zone
        </a>
        Use our complete list ......................... available online.
    </div>


Screen Shot

最佳答案

尝试这个,
HTML代码

<div style="position: absolute; top: 0px; background-color:green; ">Find the latest ***** available across a*******sites <a target="_blank"href="http://www.website.zone/">Site.Zone</a> Use our complete list ......................... available online.</div>

JavaScript代码
document.body.children[0].removeAttribute("style");

它删除了我在jsfiddle中尝试过的第一个部门的样式属性。
example

09-30 17:44
查看更多