Jump to content
Fórum Script Brasil
  • 0

Como fazer esse feito usando imagem e não botão


lkm

Question

preciso fazer esse efeito usando uma imagem ao invés do botão

<style>

.slide {position:relative;}

.slide .inner {

position:absolute;

left:0;

bottom:0;

color: #66cc66;}

.slide {

position:relative;

overflow:hidden;

height:120px;

width:350px;

margin:1em 0;

background-color:#ffc;

border:1px solid #999;

}

.slide .inner {

position:absolute;

left:0;

bottom:0;

width:338px;

height:36px;

padding:6px;

background-color:#4c5;

color:#333;

}

.slide button {margin:.7em 0 0 .7em;}

#slidebottom .inner {display:none;}

</style>

<script type="text/javascript" src="jquery-1.6.1.min.js"></script>

<script>

$(document).ready(function(){

$('#slidebottom button').hover(function(){ $(this).next().slideToggle(300); })

});

</script>

<body>

<div id="slidebottom" class="slide">

<button>gfdfgdfgdf</button>

<div class="inner">Executar efeito</div>

</div>

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

já tentou trocar onde está

<button>gfdfgdfgdf</button>

por

<img src="caminhodaimagem">

e

$(document).ready(
function()
{
$('#slidebottom button').hover(function(){ $(this).next().slideToggle(300); });
}
);
por
$(document).ready(
function()
{
$('#slidebottom img').hover(function(){ $(this).next().slideToggle(300); });
}
);

pela lógica era pra funcionar agora, talvez não... teste rsr

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.

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.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...