我做了一個簡單的佈局,但已經過了多年,因爲我已經編碼,並且在定位和移動滾動框時遇到了問題,無法與我在此圖像上創建的文本框區域對齊。將滾動框向下移動到文本框區域?
這是我到目前爲止的編碼。肯定失去了一些東西......
<center>
<div class="img">
<div class="scroll">
<a>
text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here
</a>
</div>
</div>
<style>
.img{
background-image: url(http://i65.tinypic.com/4janew.jpg);
background-size: 100% 100%;
width: 930px;
height: 634px;
text-align: center;
overflow: hidden;
padding: 7%;
}
.scroll{
height: 50%;
width: 100%;
overflow-y: auto;
padding-right: 25%;
}
.scroll a{
position: relative;
bottom: -400px;
font-size: 14px;
color: #BBA894;
font-family: Times New Roman;
}
</style></center>
你是什麼意思的滾動框和文本框?期望的結果應該是什麼樣子?此外,'
對不起,很生鏽!如果您在整個頁面上運行代碼段,您可以看到在「Alma's」名稱下面的佈局底部,我爲我想定位滾動框的位置創建了一個矩形空間。但正如您所看到的,滾動框/文本位於佈局圖像的中心,而不是底部的矩形區域。不知道我錯過了什麼,或者我需要拿出什麼,因爲我多年沒有編碼。 – Connie
另外,中心元素用於將整個圖像定位在網站上。 – Connie