I need to place a div
(with position:absolute;
) element in the center of my window.
(我需要在窗口中心放置一个div
(带有position:absolute;
)元素。)
But I am having problems doing so, because the width is unknown . (但是我遇到了问题,因为宽度未知 。)
I tried this.
(我试过了)
But it needs to be adjusted as the width is responsive. (但是,由于宽度是响应性的,因此需要对其进行调整。)
.center {
left: 50%;
bottom:5px;
}
Any ideas?
(有任何想法吗?)
ask by Ish translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…