我需要把文本圖像附近.. 這是生成的顯示圖像的CSS代碼:CSS圖片和文字右側
CSS:
#showbox {
list-style: none;
padding: 0;
width: 973;
height: 46px;
background: white repeat;
z-index: 12;
position: relative;
display: -webkit-box;
-webkit-box-orient: horizontal;
-webkit-box-pack: center;
-webkit-box-align: center;
display: -moz-box;
-moz-box-orient: horizontal;
-moz-box-pack: center;
-moz-box-align: center;
}
#showbox span {
display: none;
position: absolute;
}
#showbox a {
width: 100%;
display: inline;
text-indent: -900%;
position: absolute;
outline: none;
}
#showbox a:hover {
background-position: left bottom;
}
#showbox a:hover span{
display: inline;
}
#showbox .one {
width: 46px;
height: 46px;
top: 0px;
left: 0px;
background: url(images/cerchio1.png) no-repeat;
}
#showbox .two {
width: 46px;
height: 46px;
top: 0;
left: 240px;
background: url(images/cerchio2.png) no-repeat;
}
#showbox .three {
width: 46px;
height: 46px;
top: 0px;
left: 480px;
margin-right: 12px;
background: url(images/cerchio3.png) no-repeat;
}
#showbox .four {
width: 46px;
height: 46px;
top: 0px;
left: 720px;
margin-right: 12px;
background: url(images/cerchio4.png) no-repeat;
}
HTML:
<div id="showbox">
<a class="one"></a>
<a class="two"></a>
<a class="three"></a>
<a class="four"></a>
</div>
如果我想要圖像右側的文字,我該怎麼辦? 我必須創建另一個文本框? 此圖像的代碼是好的或可以刪除部分代碼?謝謝
爲什麼你將圖片放在背景中而不是使用'img'標籤? –
在每個圖像(右側)或圖像組/區域的右側之後,是否需要每個鏈接中都有文字? –
是的,我需要[圖像]文字... [圖像]文字...從圖像的右邊緣一點點,在圖像中間對齊。 – mds