z-index的 [英] z-index

查看:111
本文介绍了z-index的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想要使用z-index组建一个网站。

问题是,讨论z-index的众多网站主要是说和

演示使用2图层。

显示一个图层如何优先于另一个图层。

很少讨论分区图层的实际实现。

例如:我有左侧菜单栏中有10个项目。

项目1是主页。将项目7设为显示的部门的步骤是什么?

我理解z-indexing的基础知识,现在才开始实现它

正确。


任何人都有工作网站这样做吗?

解决方案

< blockquote> Richard写道:

想要使用z-index组建一个网站。
问题是,讨论z-index的众多网站主要是说和
演示使用2层。
显示一层优先于另一层。
很少讨论分区层的实际实现。
例如:我在左侧菜单栏中有10个项目。项目1是家。将项目7设为显示部门的程序是什么?
我理解z-indexing的基础知识,现在正确地实现它


>任何人都有一个工作网站吗?




这可能有用:

http://www.dzinelabs.com/Pages/stackingdemo.htm
http://www.dzinelabs.com/Pages/positioning_four.htm


mscir写道:

Richard写道:

想要使用z-index整理网站。问题是,讨论z-index的众多网站主要讲的是
展示了2层的使用。
显示一层优先于另一层。
很少有人讨论divis的实际实现例如:我在左侧菜单栏中有10个项目。
项目1是主页。将项目7设为显示部门的程序是什么?
我理解z-indexing的基础知识,现在正确地实现它


>任何人都有一个工作网站这样做?


这可能有用:
http://www.dzinelabs.com/Pages/stackingdemo.htm
http://www.dzinelabs.com/Pages/positioning_four.htm




谢谢。第一个讨论了数十亿次,没有真正的讨论如何实现分层。

第二个不是我想要的任何方式。 />
它使用php进行交换。


从我到目前为止看到的,主要是做什么是显示如何

位置:绝对有效。

对于他们所展示的内容,甚至不需要z-index。

除非你想要一个文本下的图像。


On Sun,2004年12月12日17:37:14 -0600,Richard < An ******* @ 127.001>

写道:

mscir写道:

Richard写道:

想要使用z-index组建一个网站。
问题是,讨论z-index的众多网站主要讲的是
演示了2层的使用。
显示一个图层如何优先于另一个图层。
很少讨论分区图层的实际实现。
例如:我在左侧菜单栏中有10个项目。
项目1是家将项目7设为显示部门的程序是什么?
我理解z-indexing的基础知识,现在正确地实现它


>任何人都有一个工作网站吗?


这可能有用:


http://www.dzinelabs.com/Pages/stackingdemo.htm
http://www.dzinelabs.com/Pages /positioning_four.htm



谢谢。第一个讨论了数十亿次,没有真正讨论如何实现分层。
第二个不是我想要的任何方式。
它使用php进行交换从目前为止我所看到的,主要是做的是显示
位置:绝对是否有效。
对于他们所展示的内容,z-index isn''甚至需要。
除非你想要一个文字下的图像。




对于你在原帖中所说的内容,你不需要z-index

全部。相反,你使用display:none;和显示:块;并使用JavaScript切换两者之间的



当JS和/或CSS被禁用时,你的所有十个内容部分

将在页面上一个接一个地显示。但如果它们都启用了

,那么当首次加载

页面时,您将第2-9节的显示更改为无。点击其中一个链接会将当前可见部分的

显示更改为无,并显示

新部分为阻止 。


z-index不需要,除非你的部分设计涉及层叠

图层。但这对你所描述的问题来说是一个完全独立的问题。


史蒂夫


Wanting to put together a site using z-index.
Problem is, the numerous sites that discuss z-index mostly speak of and
demonstrate the use of 2 layers.
Showing how one layer has priority over the other.
Very few discuss the actual implementation of divisional layers.
e.g.: I have 10 items in the left menu bar.
Item 1 is the "home" division.
What is the procedure for making item 7 the displayed division?
I understand the basics of z-indexing, just now how to implement it
correctly.

Any one have a working site that does this?

解决方案

Richard wrote:

Wanting to put together a site using z-index.
Problem is, the numerous sites that discuss z-index mostly speak of and
demonstrate the use of 2 layers.
Showing how one layer has priority over the other.
Very few discuss the actual implementation of divisional layers.
e.g.: I have 10 items in the left menu bar.
Item 1 is the "home" division.
What is the procedure for making item 7 the displayed division?
I understand the basics of z-indexing, just now how to implement it
correctly.

Any one have a working site that does this?



This might be useful:

http://www.dzinelabs.com/Pages/stackingdemo.htm
http://www.dzinelabs.com/Pages/positioning_four.htm


mscir wrote:

Richard wrote:

Wanting to put together a site using z-index.
Problem is, the numerous sites that discuss z-index mostly speak of and
demonstrate the use of 2 layers.
Showing how one layer has priority over the other.
Very few discuss the actual implementation of divisional layers.
e.g.: I have 10 items in the left menu bar.
Item 1 is the "home" division.
What is the procedure for making item 7 the displayed division?
I understand the basics of z-indexing, just now how to implement it
correctly.

Any one have a working site that does this?

This might be useful: http://www.dzinelabs.com/Pages/stackingdemo.htm
http://www.dzinelabs.com/Pages/positioning_four.htm



Thanks. The first one is discussed a zillion times over with no real
discussion on how layering is actually achieved.
The second one is not what I want in any way.
It uses php for the swapping.

From what I''ve seen so far, mostly what is done is show how
position:absolute works.
For what they show, z-index isn''t even needed.
Unless you want an image under text.


On Sun, 12 Dec 2004 17:37:14 -0600, "Richard" <An*******@127.001>
wrote:

mscir wrote:

Richard wrote:

Wanting to put together a site using z-index.
Problem is, the numerous sites that discuss z-index mostly speak of and
demonstrate the use of 2 layers.
Showing how one layer has priority over the other.
Very few discuss the actual implementation of divisional layers.
e.g.: I have 10 items in the left menu bar.
Item 1 is the "home" division.
What is the procedure for making item 7 the displayed division?
I understand the basics of z-indexing, just now how to implement it
correctly.

Any one have a working site that does this?


This might be useful:


http://www.dzinelabs.com/Pages/stackingdemo.htm
http://www.dzinelabs.com/Pages/positioning_four.htm



Thanks. The first one is discussed a zillion times over with no real
discussion on how layering is actually achieved.
The second one is not what I want in any way.
It uses php for the swapping.

From what I''ve seen so far, mostly what is done is show how
position:absolute works.
For what they show, z-index isn''t even needed.
Unless you want an image under text.



For what you decsribe in your original post, z-index isn''t needed at
all. Instead you use display: none; and display: block; and toggle
between the two with JavaScript.

When JS and/or CSS is disabled then all ten of your content sections
will display one after another down the page. But if they are both
enabled then you change the display of sections 2-9 to ''none'' when the
page first loads. Clicking on one of the links would change the
display of the current visible section to ''none'' and the display of
the new section to ''block''.

z-index not required unless part of your design involves stacking of
layers. But that''s a totally separate issue to the one you described.

Steve


这篇关于z-index的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆