Jump to content
  • 0

Эффект перекатывания с помощью стилей


mr-mystery
 Share

Question

Здравствуйте!

На вашем сайте я прочитал совет эффекта перекатывания с помощью стилей, все понятно. Но у меня возник еще один вопрос.

Как с помощью стилей (если это возможно) сделать так чтобы при наведении курсора мыши на картинку в одном месте появлялась картинка в другом, к примеру над ней.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; windows-1251" />
<title>proverka</title>
<style type="text/css">
div#uroven_1 {
margin:auto auto;
width:50px;
height:20px;
border:5px solid #000000;
background:#990000;
color:#FFFFFF;
text-align:center;
}
div#poyavlenie {
position:absolute;
bottom:0;
left:0;
border:1px solid #000000;
width:250px;
height:250px;
background-position:center center;
background-repeat:no-repeat;
}
</style>
<script type="text/javascript">
function xxx()
{
document.getElementById('poyavlenie').style.backgroundImage = "url(image.jpg)";
}
</script>
</head>

<body>

<div id="uroven_1" onmouseover="xxx()">navedi</div>

<div id="poyavlenie"> </div>
</body>
</html>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy