gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 11:12:18 24 4
gpt4 key购买 nike

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

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com