我想要做的HTML和CSS ..我想在第二排的每個按鈕上每個箭頭的第一行上的底部..我的意思,我想他們之間添加空間。我怎樣才能做到這一點??
這裏是第二行我的HTML代碼:
<table style="width:1160px; margin-top:10px" cellspacing="10" cellpadding="0" bordercolor="#666666" >
<tr>
<td width="193px" class="button" ><img src="b2.png" /></td>
<td width="193px" class="button" ><img src="b2.png" /></td>
<td width="193px" class="button" ><img src="b2.png" /></td>
<td width="193px" class="button" ><img src="b2.png" /></td>
<td width="193px" class="button" ><img src="b1.png" /></td>
<td width="193px" class="button" ></td>
</tr>
</table>
,這裏是類按鈕的CSS:
.button {
width:152px;
text-align:center;
background:rgb(51,153,51);
position:relative;
overflow:hidden;
margin:1px;
float: left; /* add this */
}
.button a{
display:block;
height:37px;
color:white;
line-height:100px;
text-decoration:none;
position:relative;
z-index:10;
}
.button:before {
content:" ";
display:block;
width:152px;
height:37px;
background:rgba(0,0,0,0.5);
position:absolute;
left:0;
top:100%;
transition:all 0.5s;
}
.button:hover:before {
top:0;
}
任何幫助?
你能提供一個小提琴嗎? – hjpotter92
你是什麼意思的小提琴? – user3675605
[jsfiddle](http://fsfiddle.net) –