我的網頁由兩部分組成:一個將調整大小爲任意窗口大小的圖像,然後是一個帶有4個文本框的窗體,位於圖像頂部的特定位置。將元素放置在窗口上的相同位置調整大小
我的問題是文本框移動窗口大小調整位置的方式。我花了6個多小時拉我的頭髮試圖在CSS和jQuery的一切,但沒有什麼我可以去工作。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
body
{
margin: auto;
width: 100%;
}
.Wrapper
{
position:relative;
min-width: 500px;
width: 100%;
margin:auto;
}
.Image
{
max-width: 1150px;
max-height: 1453px;
width: 100%;
}
.Form
{
position: relative;
top:-260px;
left: 200px;
width: 130px;
border: solid 1px #000;
}
</style>
</head>
<body>
<div class="Wrapper">
<div>
<img src="image.png" class="Image" />
</div>
<div class="Form">
<input type="text" />
<br />
<input type="text" />
<br />
<input type="text" />
<br />
<input type="text" />
</div>
</div>
</body>
</html>
全窗口:
大小的窗口:
你能創建一個jsfiddle嗎?你的標記+ CSS不會在你的屏幕截圖中重新創建佈局 – Ejaz 2013-04-11 18:30:29
黑盒從哪裏來?它是圖像的一部分嗎? – Blazemonger 2013-04-11 18:31:00
@Blazemonger - 是的,它是圖像。 – 2013-04-11 18:32:17