1
我的目標是製作一個DIV,在hover
上提供最新的四個新聞鏈接,標題和小圖片。如何使用CSS對齊盒子內部的鏈接?
該框將很小(150px高50px的寬度),並將擴大到約500px。一旦文章被點擊,它會彈出一個框,你可能會退出。此框會在內容的其餘部分放置一個黑色圖層,以便用戶關注它。
反正......這是我目前的CSS。
#news {
position: fixed;
top: 250px;
left:0px;
background-color: blue;
min-width: 20px;
max-width: 600px;
height: 200px;
}
#news a {
display: none;
padding-bottom: 5px;
color: white;
}
#news:hover {
display: block;
padding: 0px 10px 0px 0px;
}
#news:hover a {
display: block;
}
我的HTML使用a
標籤編輯的位置,但想知道是否有人對如何去制作DIV中的盒子看起來整齊,符合我的命令有什麼建議?