CSS I want a div to be on top of everything

前端 未结 6 1417
孤街浪徒
孤街浪徒 2020-12-04 16:21

How do I make an html div tag to be on top of everything?

6条回答
  •  无人及你
    2020-12-04 16:54

    z-index property enables you to take your control at front. the bigger number you set the upper your element you get.

    position property should be relative because position of html-element should be position relatively against other controls in all dimensions.

    element.style {
       position:relative;
       z-index:1000; //change your number as per elements lies on your page.
    }
    

提交回复
热议问题