如何在所有其他元素/ div上显示我的元素(`class =" line"`) [英] How can I display my element(`class="line"`) over all other elements/div?
本文介绍了如何在所有其他元素/ div上显示我的元素(`class =" line"`)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在所有其他元素/ div上显示我的元素( class =line
)?
How can I display my element(class="line"
) over all other elements/div?
<div class="line" style="float:left; margin-left:-40px; margin-top:50px; width:30px; color:gray; height:10px; font-size:22px; font-weight:470">_</div>
我需要有操作 margin-top:50px
I need to have possibilities to manipulate on margin-top:50px
推荐答案
我们可以通过以下方式:
we can give in following ways:
我们可以将 class =line
添加到位置
属性
并提及 Z-index
属性(图层概念
)
we can add class="line"
to position
property
and mention Z-index
property (layer concept
)
.line
{
position:absolute;
z-index:2
}
.otherclass
{
position:absolute;
z-index:1;
}
我们应该在 Position
property
we should specify both in Position
property
这篇关于如何在所有其他元素/ div上显示我的元素(`class =" line"`)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文