我有一个只有500x250文本框和图像的白页。该页面是流畅的。如何将中心文字和固定图像放在一起?
我试图将文本框置于页面中央,同时将图片固定在屏幕的左下角。我用下面的CSS部分地实现这一点:
.bottom-right { /* used to fix the image to the bottom of the screen */
bottom: 0;
right: 0;
position: fixed;
}
#content {
margin-left: auto;
margin-right: auto;
margin-top: 50%;
width: 500px;
height: 250px;
position: relative;
}
当我垂直调整窗口的大小,图像覆盖了文本框。我反而希望文字上去。
“go up”是指“定位在图像上而不是下面”或“在图像顶部,以便您仍然可以读取图像顶部的文字” – jcolebrand
,以便您仍然可以阅读文本(只要该边距仍然有空间:屏幕的50%)。 – simpatico