Bootstrap 4 Laravel-如何在卡片和分页之间创建距离
我使用bootstrap4编写“postwo”,并使用分页进行页面编号,但为什么在bootstrap4中卡片和分页粘合在一起呢。我想在卡片和分页之间留出一段空白距离,我可以将其移动到中间或右侧,我可以使用Bootstrap 4 Laravel-如何在卡片和分页之间创建距离,bootstrap-4,Bootstrap 4,我使用bootstrap4编写“postwo”,并使用分页进行页面编号,但为什么在bootstrap4中卡片和分页粘合在一起呢。我想在卡片和分页之间留出一段空白距离,我可以将其移动到中间或右侧,我可以使用将它们分开。但还是无法用空格将它们分开。这是Posts页面的索引文件 @extends('layouts.app') @section('content') <h1>Posts</h1> @if (count($posts) > 0)
将它们分开。但还是无法用空格将它们分开。这是Posts页面的索引文件
@extends('layouts.app')
@section('content')
<h1>Posts</h1>
@if (count($posts) > 0)
@foreach ($posts as $post)
<div class="card bg-light card-body mt-2">
<h3><a href="/posts/{{$post->id}}">{{$post->title}}</a></h3>
<small>Written on {{$post->created_at}}</small>
</div>
@endforeach
{{$posts->links()}}
@else
<p>No Posts Found</p>
@endif
@endsection
这与引导程序有关,与Laravel/Elotent无关。你可以改变
<div class="card bg-light card-body mt-2">
到
{{$posts->links()}
感谢它现在的工作,虽然限制是mt-5,但有没有比这更大的方法?很高兴它能工作。如果您使用的是Sass,“您可以通过向$spacers-Sass-map变量添加条目来添加更多大小。”或者在纯CSS中创建您自己的间隔
<div class="card bg-light card-body mt-2">
<div class="card bg-light card-body my-2">
{{$posts->links()}}
<div class="mt-2">
{{$posts->links()}}
</div>