Pregunta:
Fecha: 25-03-2019 05:25:33
(En Español)
Alguien sabe como hacer un carousel con bootstrap 4 vertical[No resuelta]
Lo que tengo hecho funciona pero en horizontal, quisiera hacer uno en forma vertical
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
global $salida;
$theValue = function_exists("mysqli_real_escape_string") ? mysqli_real_escape_string($salida, $theValue) : mysqli_escape_string($salida,$theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$query_Publicidad2 = sprintf("SELECT * FROM tblanuncios WHERE intActivo=1 AND intPosicion=2 ORDER BY intOrden ASC LIMIT 4");
$Publicidad2 = mysqli_query($salida, $query_Publicidad2) or die(mysqli_error($salida));
$row_Publicidad2 = mysqli_fetch_assoc($Publicidad2);
$totalRows_Publicidad2 = mysqli_num_rows($Publicidad2);
?>
<?php if ($row_Publicidad2['strImagen']!=""){?>
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<?php $activo = 0;?>
<?php do { ?>
<?php if ($activo == 0) {
echo '<div class="carousel-item active">';
} else {
echo '<div class="carousel-item">';
}
?>
<div class="row">
<div class="col-lg-6">
<div class="card">
<a href="<?php echo $row_Publicidad2['strLink']; ?>"><img class="card-img-top" src="imagenes/anuncios/<?php echo $row_Publicidad2['strImagen'];?>" alt="<?php echo $row_Publicidad2['strTitulo']; ?>" title="<?php echo $row_Publicidad2['strTitulo']; ?>"> </a>
</div>
</div>
</div>
</div>
<?php $activo++; ?>
<?php } while ($row_Publicidad2 = mysqli_fetch_assoc($Publicidad2)); ?>
</div>
<!-- Indicators -->
<?php $Rows = mysqli_num_rows($Publicidad2);
echo '<ol class="carousel-indicators hidden">';
for ($i=0; $i<$Rows; $i++) {
if ($i == 0) {
echo '<li data-target="#myCarousel" data-slide-to="0" class="active"></li>';
} else {
echo '<li data-target="#myCarousel" data-slide-to="' . $i . '"></li>';
}
}
echo '</ol>';
?>
<!-- Fin Indicators -->
<a class="carousel-control-prev" href="#myCarousel" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Anterior</span>
</a>
<a class="carousel-control-next" href="#myCarousel" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Siguiente</span>
</a>
</div><?php }?>
<?php
mysqli_free_result($Publicidad2);
?>
Votos: 0 -
Respuestas: 1 -
Vistas: 3
Compartir en: Google
Facebook
Twitter
LinkedIn
Link
Respuestas:
-
Fecha: 26-03-2019 05:55:37 Creo que esto te puede servir
Bootstrap 4 Alpha 6 Vertical Carousel
La explicación del código la puedes ver aquí
"Las transiciones de animación de Bootstrap 4 se utilizan transform , por lo que creo que sería mejor usarlas translate para cambiar la orientación a vertical, y la posición de cada diapositiva" (sic) Votos: 0 - Link respuesta
Para participar activamente de la comunidad primero debes autenticarte, ingresa al sistema.Iniciar Sesión
