html - 从正文中删除 div 样式文本

标签 html css

如何删除包含正文类下方文本的“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

关于html - 从正文中删除 div 样式文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33524391/

相关文章:

css - 帮助 CSS 定位

JQuery 导航粘性

javascript - 隐藏元素,1秒延迟

html - 水平居中并调整内容

javascript - Material-UI 对话框按钮的左对齐

javascript - 如何动态给出 json 响应..?

html - 使用 Chrome/IE 进行奇怪的顶部填充并显示 :inline on ul list

css - 将默认样式设置为 ASP.Net 中的表格

css - 奇怪的文本定位

CSS - 背景大小不适用于 jpg 扩展