Home >Web Front-end >HTML Tutorial >How to display a div when clicked without affecting the layout of other nearby divs? _html/css_WEB-ITnose

How to display a div when clicked without affecting the layout of other nearby divs? _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:55:161582browse


I want to achieve this. Put the mouse on the avatar and then a div user information will be displayed. However, when I do it myself, displaying the div will affect the layout of other surrounding divs. Can anyone tell me what is good? method?


Reply to the discussion (solution)

Use position to position a div, and then use js to show the positioned div when the mouse passes over it ()

Use position to position a div, and then use js to show the positioned div when the mouse passes by ()


Same as the position above

Use positioning to position a div, and then use js to show () the positioned div when the mouse passes by.


I don’t know why. I tried it before but it didn’t work. Same thing. Just tell me the method and I will try again = = . . Thank you very much. CSDN is better


Use position to position a div, and then use js to show the positioned div when the mouse passes over it ()


Same as the positioning upstairs
Yeah, same thanks. I was too careless and didn’t pay attention when I tested it before == The effect is really much easier

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