@extends('layout.sbbj')
@section('title','sbbj')
@section('left')
<p>left</p>
@endsection
@section('center')
<p>center</p>
@endsection
@section('right')
<p>right</p>
@endsection
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>@yield("title",'圣杯布局')</title>
</head>
<style>
header {
background-color: skyblue;
height: 150px;
width: 100%;
line-height: 150px;
text-align: center;
}
.flex-box {
display: flex;
}
.flex-left {
background-color: lightgray;
flex: 0 0 200px;
height: 400px;
width: 100px;
line-height: 400px;
text-align: center;
}
.flex-center {
background-color: lightyellow;
flex-grow: 1;
height: 400px;
width: 50px;
line-height: 400px;
text-align: center;
}
.flex-right {
background-color: lightgray;
flex: 0 0 200px;
height:400px;
width: 100px;
line-height: 400px;
text-align: center;
}
footer {
background-color: skyblue;
height: 150px;
width: 100%;
line-height: 150px;
text-align: center;
}
</style>
<body>
<header>header</header>
<div class="flex-box">
<div class="flex-left">@yield('left')</div>
<div class="flex-center">@yield('center')</div>
<div class="flex-right">@yield('right')</div>
</div>
<footer>footer</footer>
</body>
</html>
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/0286c3a631122e27270d24254cdc6ce8.png)