Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
288 views
in Technique[技术] by (71.8m points)

html - ZIndex stacking IFRAME and DIV inside a flexbox list

My question is about stacking two HTML elements (first is an iFrame, second is a div) according to their zIndex inside a DIV that belongs to a flexbox list.

The main HTML is

<html>
...
<body style="display:flex;flex-direction:column;">
<div id="0" style="position: relative; order: 0; border-left: none;"><iframe ....></iframe></div>
...
</body>
</html>

What happens is that at a certain point a new DIV is appended to the main item DIV so there are two elements.

<html>
...
<body style="display:flex;flex-direction:column;">
<div id="0" style="position: relative; order: 0; border-left: none;"><iframe ....></iframe>
<div id="anotherDiv" style="z-index:1;" .... />
</div>
...
</body>
</html>

I need the second element to be on the other (preferably on the right and vertically centered), not after, as I see it is now when rendered.

No matter what style parameters I assign I cannot obtain what I want.

How can this be done?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...