创建了此维恩图作为一种导航区使用。维恩图与背景图片,添加链接?
http://i.stack.imgur.com/xlyCJ.png
当用户将鼠标悬停在每圈的图像变化(相同的图像,减去绿色覆盖和文本)。我想让每个圈子都是可点击的,每个圈子都链接到网站中的相应页面。
虽然无法弄清楚。
这里是我用来创建它的HTML的& CSS。
HTML:
<div class="buttons">
<div><a class="buttons" href="fashion_design.html"></a></div>`
<div><a href="costume_design.html"> </a></div>
<div><a href="photography.html"></a></div>
<div><a href="artwork.html"></a></div>
</div><!--buttons-->
CSS: .buttons DIV { 宽度:390px; height:390px; border-radius:200px; -moz-border-radius:200px; -webkit-border-radius:200px; -khtml-border-radius:200px; float:left; 不透明度:0.9; display:block; }
.buttons div:hover {
background-position:0px 400px;
z-index:5;
position:relative;
}
.buttons div:nth-child(1) {
background-image:url(images/fashion_hover.png);
color: #FFF;
margin-top:60px;
z-index:1;
}
.buttons div:nth-child(2){
background-image:url(images/costume_double.png);
color: #FFF;
margin-left:-60px;
margin-top:60px;
z-index:2;
}
.buttons div:nth-child(3){
background-image:url(images/photography_hover.png);
color: #FFF;
margin-top:-60px;
z-index:3;
}
.buttons div:nth-child(4){
background-image:url(images/artwork_hover.png);
color: #FFF;
margin-left: -60px;
margin-top:-60px;
z-index:4;
}
尝试了每个JavaScript,完美的作品。非常感谢! – user2233093
是否可以直接导航到页面而不是打开新窗口? – user2233093
'window.open(“http://www.yahoo.com”,“_self”)' –