Ja eksperymentuje z bootstrap i jest to kod, który napisałem:Tworzenie reagujących DIV w bootstrap
<!doctype html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="./css/bootstrap.min.css">
<link rel="stylesheet" href="./css/bootstrap-theme.min.css">
<style type="text/css">
.row-centered {
text-align:center;
}
.col-centered {
display:inline-block;
float:none;
text-align:left;
margin-right:-4px;
}
.pos{
position: relative;
top: 240px;
}
</style>
</head>
<body>
<div class="container">
<div class="row row-centered pos">
<div class="col-lg-8 col-centered">
<div class="well"></div>
</div>
<div class="col-lg-8 col-centered">
<div class="well"></div>
</div>
<div class="col-lg-8 col-centered">
<div class="well"></div>
</div>
</div>
</div>
</body>
</html>
Wyjście jest jak pokazano na zrzucie ekranu:
Ale kiedy przekonwertować na ekranie telefonu , Otrzymuję w ten sposób:
Chcę, aby divy pojawiły się w centrum z jednym powyżej na ekranach mobilnych, jak również. Jak mogę to zrobić? Ale nie reaguje.
użyć col-md-8, col-sm-8 razem z col-lg – Patrick
czy próbowałeś zmienić wyświetlacz na blok, a nie wbudowany blok? W tej chwili nie jestem gotowy na jsfiddle –