2个div层 显示顺序问题_html/css_WEB-ITnose
.leftg1{top:0px;position:relative; z-index:1;}.tableindex{z-index:2;position:relative;}
想让tableindex 在leftg1上面 firefox 可以 ie 下面不行
如果 .leftg1 {top:0px;position:relative; z-index:-1;} 可以 但是 .leftg1 上面的元素不能编辑了 求解
回复讨论(解决方案)
leftg1 层是移动层
<div id="a"> <div id="a1" style="position:relative; z-index:2;">A-1 下拉层</div></div><div id="b" ><div id="b1" style="position:relative;z-index:1;">B 上下滚动层</div></div>
是这个样子的
不用
XML/HTML code?123456
你这样的话 ,他俩永远不会覆盖啊
2个重回的时候就 遮盖了
就像这个页面 产品中心下拉 被左侧遮住了(ie 下遮住了 firefox 没有遮住)
对于IE浏览器的种种毛病我就不多说了,今天就说说在ie下如果设置了position:relative;后z-index就失效的问题,在做前端开发的时候Yovae我就被此问题纠缠过。
IE浏览器对于设置了position的元素会自动生成一个新的stacking context,导致 z-index被重置 为0,所以z-index才失效了。所以我们需要在这个元素的父元素上设置一个更高的z-index值。来消除这个影响。
参考:http://www.yovae.com/blog/ie%E7%9B%B8%E5%AF%B9%E5%AE%9A%E4%BD%8Dz-index%E5%A4%B1%E6%95%88%E9%97%AE%E9%A2%98.html
z-index:1写在html中

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

The role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.
