我有一個關於使按鈕顯示的圖像 例如問題,我有四個按鈕 我想顯示在圖像CSS ..我怎樣才能使按鈕顯示的圖像
在其他相同內容的圖像中的每個按鈕關鍵詞: 當您按下其中一個按鈕顯示您的圖像
這裏有一個例子:http://jsfiddle.net/i5yal/yvCtQ/1/
<div id="section-container">
<div class="section-img-container"><a>images will appear here</a>
</div>
</div>
<div id="section-button-container"><div>
<div class="section-button1"><a>1</a>
</div>
<div class="section-button2"><a>2</a>
</div>
<div class="section-button3"><a>3</a>
</div>
<div class="section-button4"><a>4</a>
</div>
</div>
</div>
CSS代碼:
#section-container {
background-color: #C0C0C0;
width: 300px;
height: 300px;
margin:0 auto;
}
#section-button-container {
width: 300px;
height: 30px;
margin:0 auto;
}
.section-button1 {
background-color: #808000;
width: 30px;
height: 30px;
float: left;
display: block;
margin-left: 30px;
margin-right: 20px;
}
.section-button2 {
background-color: #808000;
width: 30px;
height: 30px;
float: left;
display: block;
margin-left: 20px;
margin-right: 20px;
}
.section-button3 {
background-color: #808000;
width: 30px;
height: 30px;
float: left;
display: block;
margin-left: 20px;
margin-right: 20px;
}
.section-button4 {
background-color: #808000;
width: 30px;
height: 30px;
float: left;
display: block;
margin-left: 20px;
margin-right: 20px;
}
.section-img-container {
background-color: #008080;
background-position: center center;
width: 270px;
height: 270px;
margin: 0 auto;
}
對於輔助功能,爲什麼不做'' –
有幾種方法可以做到這一點。如果你希望圖像是可點擊的(看起來你在那裏看到一個錨標記),那麼你可以有一個默認圖像,說一個問號或你的錨點中的東西,然後用jQuery改變它的源代碼。如果這是你想要評論的內容,我會爲你發佈一個例子。 – origin1tech
@ C.Hazelton + Ryan B 謝謝你的回答, 要清除我的問題我想要做的事情是這樣的: http://tympanus.net/Development/BookBlock/index2.html – EXIT