Home >Web Front-end >HTML Tutorial >CSS novice_html/css_WEB-ITnose

CSS novice_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-24 12:16:04960browse

h2.pos_abs
{
position:fixed;
position:absolute;
left: 400px;
top: 77px;
}
531ac245ce3e4fe3d50054a55f265927
                    9c3bca370b5104690d9ef395f2c5f8d1                                                    ="../nav-bar-tw.png"/>2e9b454fa8428549ca2e64dfac4625cd
36cc49f0c466276486e50c850b7e4956

Positioning doesn’t work, the browser will move when you zoom in or out


Reply to the discussion (solution)


http://www.w3school.com.cn/css/css_positioning_absolute.asp Understand the concept of absolute relative, I don’t know what position you are talking about What is it? I don’t use it.

Try this:


When editing to the middle position, the display will be just right. When browsing, just zoom in or out and the browser will go to the left

<style>body{ position:relative;}h2.pos_abs  {position:absolute;left: 400px;top: 77px;  }  </style>

You If you want to zoom in and out the left and right widths, you should use percentages instead of pixel units. The absolute positioning should be set at the outermost layer. The relative distance to the left is the right percentage

It should be like this. I recommend you a website. Learn css

http://www.divcss5.com/css3/

If you want to zoom in or out the left and right widths, you should use percentages instead of pixel units, and absolute positioning should be set at the outermost layer. Which percentage is correct relative to who is left? Thank you for understanding

Who can write an example to see

"Xiaobaicai" begs the hero to leave QQ so that he can consult the hero in detail

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