こんにちは私は自分が作っているウェブサイトを持っています。私は、バックグラウンドが追加される前に仕事をしていた背景の上にテキストとボタンを持っています。しかし今、彼らはもはや働いていません。それらは画面に描画されますが、機能しません。分間、このコードを見てください:HTMLとCSSのボタンが機能しない
<div id = "rect0">
<div class = "banner grid_18" href="about.html">
</div>
<a href="logic.html" class="button" id ="new">View Article</a>
<div class=" grid_8 callout">
</div>
<a href="gallery.html" class="button" id ="new1">View Gallery</a>
</div>
ボタンは、その後のdiv rect0外にある場合、それらは機能しますが、彼らは内にあるとき、彼らはクリックできません。ここにそれを達成しているCSSケースがあります。
#rect0{
position: relative;
margin-top: -10px;
margin-left: 0px;
width: 951px;
height: 270px;
padding-left: 4px;
padding-top: 1px;
background: #ffffff;
z-index: -1;
}
.button{
background: #242324;
color: #B7B7B7;
padding: 6px;
color: white;
font-size: 11px;
text-transform: uppercase;
}
.button:hover{color: #d2d2d2;}
#new{
position: absolute;
margin-left: -140px;
margin-top: 220px;
}
#new1{
position: absolute;
margin-left: 117px;
margin-top: 220px;
}
ボタンをアクティブにできないのは間違っていますか?ありがとう - ジャック。
背後
div
をレンダリング/z-index: 0
動いています-index:-1'となります。リンクがありますか? – darrylyeo