CSS - Problema transition en height auto

 
Vista:

Problema transition en height auto

Publicado por nacho (21 intervenciones) el 26/08/2014 02:42:09
Hola, buenas.

Tengo el siguiente código:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<style>
#acordeon {
	width: 230px;
	margin:5px auto auto auto;
    align: Left;
}
 
#acordeon .item {
	width: 230px;
	overflow: hidden;
	color: #000000;
	height:15px;
	font-size:11px;
	font-family: helvetica;
	cursor: pointer;
	margin-bottom: 3px;
	text-align: center;
	vertical-align: middle;
	transition: height ease-in-out 500ms; /* css3 transition */
	-o-transition: height ease-in-out 500ms;
	-moz-transition: height ease-in-out 500ms;
	-webkit-transition: height ease-in-out 500ms;
	}
 
#acordeon .polo a {
	text-decoration:none; font-family: helvetica;
	font-size: 10px;
	text-aling: center;
	color:#ffffff;
	background: #87e0fd; /* Old browsers */
	background: -moz-linear-gradient(top,  #87e0fd 0%, #53cbf1 40%, #05abe0 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#87e0fd), color-stop(40%,#53cbf1), color-stop(100%,#05abe0)); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* IE10+ */
	background: linear-gradient(to bottom,  #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#87e0fd', endColorstr='#05abe0',GradientType=0 ); /* IE6-9 */
 
	font-size:10px;
	cursor: pointer;
}
 
#acordeon .item a {
	text-decoration: none;
	border-radius: 10px;
	color:#000000;
	display: block;
	width:230px;
	height: 15px;
	vertical-align: middle;
	background: #99b6dd; /* Old browsers */
	background: -moz-linear-gradient(top,  #99b6dd 1%, #eff7fc 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#99b6dd), color-stop(100%,#eff7fc)); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  #99b6dd 1%,#eff7fc 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  #99b6dd 1%,#eff7fc 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  #99b6dd 1%,#eff7fc 100%); /* IE10+ */
	background: linear-gradient(to bottom,  #99b6dd 1%,#eff7fc 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#99b6dd', endColorstr='#eff7fc',GradientType=0 ); /* IE6-9 */
	margin-bottom:5px;
	transition: all .3s ease;
 
}
 .clearing{
      clear:both;
   }
 
#acordeon .item:hover{
	¡¡¡¡¡ EL PROBLEMA ES QUE ME PONE A TODA VELOCIDAD EL ALTO Y QUIERO QUE VAYA POCO A POCO ¡¡¡¡
                                         COMO LO PUEDO HACER PARA QUE VAYA LENTO??????????='/img/emoticons/smile.gif' width='22' height='22' border='0' />
 
    height:auto;
}
 
</style>
 
<?php
$Categoria1 = str_replace("-", " ",$_GET['Categoria1']);
$Categoria2 = str_replace("-", " ",$_GET['Categoria2']);
 
function left($string, $count){
   return substr($string, 0, $count);
 }
 
echo "<div id='acordeon'><div id='acordeon'>";
$Lis=mysql_query("SELECT Categoria1,Categoria2 from articulos group by Categoria1,Categoria2");
 
 
while($pro = mysql_fetch_array($Lis)) {
	if ($ulti==$pro['Categoria1'])
		{
			$z=$z+1;
 
			echo "<p style='height:17px; margin:0;'><a onmouseover='javascript: esperar(1)' style='text-decoration: none; border-radius: 10px; color:#000000; display: block; width:220px; height: 15px;	vertical-align: middle; background: #c1e9f5;' href='http://opix.es/tienda/".$pro['Categoria1']."/".$pro['Categoria2']."'>".left($pro['Categoria2'],30)."</a></p>";
		}
	else
		{
			$pus = 15*$z;
			$x = $x+1;
 
			echo "</div><div id'clearing'></div><div id='".$pus."' class='item'><a onmouseover='javascript: esperar(1)' href='http://opix.es/tienda/".$pro['Categoria1']."'>".$pro['Categoria1']."</a>";
		}
	$ulti=$pro['Categoria1'];
}
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de xve
Val: 624
Oro
Ha mantenido su posición en CSS (en relación al último mes)
Gráfica de CSS

Problema transition en height auto

Publicado por xve (490 intervenciones) el 26/08/2014 10:36:47
Hola Nacho, la manera que yo utilizo, es utilizando max-height en vez de height.

Lo que haces es poner un max-height mas grande que el height real, y eso es lo mismo que un height:auto...

Si lo deseas, revisa este código para ver como se hace: http://lwp-l.com/s2748
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Problema transition en height auto

Publicado por nacho (21 intervenciones) el 08/09/2014 19:52:43
con max-height no me abre el menu acordeon?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar