Home  >  Article  >  Web Front-end  >  Is there any other way to layer divs besides using z_index_html/css_WEB-ITnose

Is there any other way to layer divs besides using z_index_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:40:341890browse

I quoted Baidu Maps and then made a search bar. However, after I used position in the search bar, there would be problems with the search bar. Therefore, when position cannot be used in the search bar, the div of the map container would be obscured. I live on a map, so I want to lower it one level, but using z_index is useless. I want to ask a master for help! How to layer? What attributes to use?


Reply to the discussion (solution)

Is there any master?

Setting z-index alone: ​​useless.
You can set position: to relative; then set z-index: attribute

As mentioned above, z-index and position are used together

You cannot use position to search on Baidu Maps The default z-index of the list is 0. After I use it, the drop-down list of the text box will be blocked. After yesterday's modification, it is now the container div of Baidu Map. My z-index is set to -1, but Baidu Map cannot be selected and cannot be operated at all. Please solve it! But this didn't happen on other pages I used. . . I don’t know what’s going on. I checked the codes and they are all the same

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn