Hi there theremotedr,
here is an example, that may be of interest to you...
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<base href="http://www.coothead.co.uk/images/">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="language" content="english">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>CSS swap image</title>
<style type="text/css">
body {
-webkit-animation: bugfix infinite 1s; /* Safari adjacent sibling bug fix */
background-color:#f0f0f0;
}
@-webkit-keyframes bugfix { /* Safari adjacent sibling bug fix */
from { padding: 0; } to { padding: 0; }
}
#container {
position:relative;
width:384px;
height:348px;
padding:12px;
border:1px solid #222;
margin:20px auto;
background-color:#555;
box-shadow:#333 10px 10px 20px;
}
#a {
position:absolute;
width:382px;
height:254px;
border:1px solid #f00;
top:10px;
background-image:url(blood.jpg);
background-size:100%;
box-shadow:#222 4px 4px 8px;
}
#b,#c,#d {
position:absolute;
width:118px;
height:78px;
border:1px solid #000;
top:278px;
background-image:url(buddha.jpg);
background-size:100%;
box-shadow:#222 4px 4px 8px;
cursor:pointer;
}
#c {
left:142px;
background-image:url(autumn.jpg);
}
#d {
left:274px;
background-image:url(col.jpg);
}
#b:hover,#c:hover,#d:hover {
opacity:0.6;
}
#b:hover+div+div+div {
background-image:url(buddha.jpg);
border-color:#fef47a;
}
#c:hover+div+div {
background-image:url(autumn.jpg);
border-color:#f93;
}
#d:hover+div {
background-image:url(col.jpg);
border-color:#6785b7;
}
</style>
</head>
<body>
<div id="container">
<div id="b"></div>
<div id="c"></div>
<div id="d"></div>
<div id="a"></div>
</div>
</body>
</html>
coothead
Bookmarks