Home >Web Front-end >HTML Tutorial >CSS novice_html/css_WEB-ITnose
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)
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
"Xiaobaicai" begs the hero to leave QQ so that he can consult the hero in detail