Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

mts_designer

Botões que muda ao passar o mouse

Recommended Posts

Galera é o seguinte, sou aluno de webdesigner, mas prefiro mexer na área gráfica do que no desenvolvimento...

Estou criando um site e estou fazendo o menu, como eu quero um menu animado, eu fiz um fundo e coloquei como background da celula da tabela

 

<td background="Imagens/Menu.png" width="250" height="280">

 

E depois para acrescentar os botões eu iria colocar várias divs nessa celula para poder posicionar os botões...

Enfim, meu desejo é deixar um botão que ao passar o mouse ele fique de outra cor, sei fazer isso no Fireworks, mas no Dreamweaver eu não aprendi ainda... e como meu curso tá de férias não tem como perguntar para o professor =/

 

Eu fiz no fireworks para estudar o html que ele gera, mas é muuuito complicado para meu nivel de entendimento:

 

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>botaotestefireworks.gif</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<!--Fireworks CS3 Dreamweaver CS3 target. Created Thu Aug 20 14:33:33 GMT-0300 (Hora oficial do Brasil) 2009-->

<script language="JavaScript1.2" type="text/javascript">

<!--

function MM_findObj(n, d) { //v4.01

var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];

for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);

if(!x && d.getElementById) x=d.getElementById(n); return x;

}

function MM_nbGroup(event, grpName) { //v6.0

var i,img,nbArr,args=MM_nbGroup.arguments;

if (event == "init" && args.length > 2) {

if ((img = MM_findObj(args[2])) != null && !img.MM_init) {

img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;

if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();

nbArr[nbArr.length] = img;

for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args)) != null) {

if (!img.MM_up) img.MM_up = img.src;

img.src = img.MM_dn = args[i+1];

nbArr[nbArr.length] = img;

} }

} else if (event == "over") {

document.MM_nbOver = nbArr = new Array();

for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args)) != null) {

if (!img.MM_up) img.MM_up = img.src;

img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])?args[i+1] : img.MM_up);

nbArr[nbArr.length] = img;

}

} else if (event == "out" ) {

for (i=0; i < document.MM_nbOver.length; i++) { img = document.MM_nbOver; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }

} else if (event == "down") {

nbArr = document[grpName];

if (nbArr) for (i=0; i < nbArr.length; i++) { img=nbArr; img.src = img.MM_up; img.MM_dn = 0; }

document[grpName] = nbArr = new Array();

for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args)) != null) {

if (!img.MM_up) img.MM_up = img.src;

img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;

nbArr[nbArr.length] = img;

} }

}

 

function MM_preloadImages() { //v3.0

var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}

}

 

//-->

</script>

</head>

<body bgcolor="#ffffff" onload="MM_preloadImages('images/botaotestefireworks_f2.gif','images/botaotestefireworks_f4.gif','images/botaotestefireworks_f3.gif');">

<a href="home.html" target="_iframe" onmouseout="MM_nbGroup('out');" onmouseover="MM_nbGroup('over','botaotestefireworks','images/botaotestefireworks_f2.gif','images/botaotestefireworks_f4.gif',1);" onclick="MM_nbGroup('down','navbar1','botaotestefireworks','images/botaotestefireworks_f3.gif',1);"><img name="botaotestefireworks" src="images/botaotestefireworks.gif" width="182" height="27" border="0" id="botaotestefireworks" alt="" /></a></body>

</html>

 

Tem como fazer um comando mais facil? Tipo um img src para o botão e um img src secundário para quando passar o mouse em cima?

 

Para quem quizer conferir, eu upei um preview para testar o banner, e tá o background do menu, ainda não está os botões hehehe, e dae pretendo colocar um iframe no centro...

 

http://mtsdesigner.awardspace.us é um site temporário só para testes, pretendo colocar em um domínio depois.... comentem o banner xD, ve se gostaram e se ta funcionando certinho ae...

 

EDIT - mil perdões, não percebi que entrei no subforum, algum moderador poderia mover para o lugar correto? não to achando como deleta o tópico

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.