我怎样才能在正确的位置选择div? [英] How can I to pick the div s in correct place ?
本文介绍了我怎样才能在正确的位置选择div?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有几个< div> ,我想在特殊的地方选择它们
但问题是
位置:绝对;
顶部:350px;
left:300px;
是>>>>当我使用它并将它们放在正确的位置时,我放大了屏幕左侧的屏幕。
我怎么能放我的div正确的地方,当我缩小div选择中心
或当我放大div选择中心。
我想要div总是看到中心位置有特殊位置。
I have several < div > , i want to pick them
in special place but the problem with
position:absolute;
top:350px;
left:300px;
is >>>> when i used it and put them in correct place when i zoom in
the screen going to left side .
how can i to put my div to correct place and when i zoom out the div to pick center
or when i zoom in div to pick center .
I want to the div always see in center place with special position .
推荐答案
而不是你得到的东西放在下面(只需确保定义宽度)。并且不要在这里使用位置。
Instead of what you got there put the following (just make sure to define a width). And don't use position here.
margin-left: auto;
margin-right: auto;
http://stackoverflow.com/questions/18845131/absolute-div-top-position-changed-while-zoom-ctrl-in-chrome-浏览器 [ ^ ]
http://stackoverflow.com/questions/17492835/element-positions-upon-resizing-browser-or-zooming-in-out [ ^ ]
这篇关于我怎样才能在正确的位置选择div?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文