CSS 如何关闭相对定位?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13482936/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 20:50:22  来源:igfitidea点击:

How do I turn off relative positioning?

csswordpress

提问by Ken

http://mikroautobusunuoma.org/

http://mikroautobusunuoma.org/

The positioning of the slider on the page is screwed up in all 3 major browsers. By turning off 'position:relative' (Element style) It seems to fix the issue (In Firebug, etc.) I have searched every file on the server and cannot find where the element style is though. I used Agent Ransack to search multiple terms to try to find the line of code, to no avail.

滑块在页面上的定位在所有 3 种主要浏览器中都被搞砸了。通过关闭“位置:相对”(元素样式)它似乎解决了这个问题(在 Firebug 等中)我已经搜索了服务器上的每个文件,但找不到元素样式的位置。我使用 Agent Ransack 搜索多个术语以尝试查找代码行,但无济于事。

I am lost as where to go from here.

我迷失了从这里去哪里。

This is a wordpress site with a built-in-theme Jquery Slider.

这是一个带有内置主题 Jquery Slider 的 wordpress 站点。

    <div id="featured-slider" style="background-image: none; position: relative; overflow: hidden;">

    element.style {
       background-image: none;
       overflow: hidden;
       position: relative;
    }

回答by Gurpreet Singh

Do position:static !important;

position:static !important;

This will overwrite any existing CSS and inline style.

这将覆盖任何现有的 CSS 和内联样式。

回答by Jules

Element.style is the inline style.

Element.style 是内联样式。

If you add !importantit will overwrite the inline style but you will need to know the class/id, unless you can just change the inline style.

如果添加!important它将覆盖内联样式,但您需要知道类/ID,除非您可以更改内联样式。