当前位置:网站首页>Laravel implements the Holy Grail model with template inheritance
Laravel implements the Holy Grail model with template inheritance
2022-04-23 05:20:00 【klx2545845553】
The parent template
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<body>
<div class="container">
<div class="header">
@section('header')
<h1> head </h1>
@show
</div>
<div class="left">
@section('left')
<h1> Left </h1>
@show
</div>
<div class="right">
@section('right')
<h1> Right </h1>
@show
</div>
<div class="main">
@section('main')
<h1> in </h1>
@show
</div>
<div class="footer">
@section('footer')
<h1> The footer </h1>
@show
</div>
</div>
</body>
<style type="text/css"> /* *{ margin: 0; padding: 0; }*/ .container{
border:3px solid red; height: 600px; /* margin: 20px 20px 20px 20px;*/ position: relative; } .header{
border:1px solid red; text-align: center; overflow:hidden; top: 0; width: 100%; height: 80px; } .left{
width: 200px; height: 400px; border:1px solid lightgreen; float: left; text-align: center; line-height: 400px; } .main{
border:2px solid blue; height: 400px; text-align: center; float: left; width: 1000px; } .right{
width: 200px; height: 400px; border:2px solid green; float: right; text-align: center; line-height: 400px; } .footer{
border:2px solid lightcoral; text-align: center; position: absolute; bottom: 0; /* 4. Set the footers position by absolute after , And then bottom Value to 0, You can put it at the bottom of the page */ height: 110px; width: 100%; } </style>
</html>
Template inheritance
@extends('layout.modelfather')
@section('title'," grail ")
@section('header')
<h1>header</h1>
@endsection
@section('left')
<h3>left</h3>
@endsection
@section('right')
<h3>right</h3>
@endsection
@section('main')
<h1> Holy Grail model </h1>
@endsection
@section('footer')
<h3>footer</h3>
@endsection
版权声明
本文为[klx2545845553]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220547045543.html
边栏推荐
- MySQL external connection, internal connection, self connection, natural connection, cross connection
- 青岛敏捷之旅,来了!
- Low code and no code considerations
- 7-4 is it too fat (10 points) PTA
- Three 之 three.js (webgl)简单实现根据点绘制线/弧线(基于LineGeometry / Line2 / LineMaterial,绘制两点基于圆心的弧线段)
- Golang memory escape
- Power consumption parameters of Jinbei household mute box series
- Basic theory of Flink
- Good test data management, in the end how to do?
- 我这位老程序员对时代危险和机遇的一点感悟?
猜你喜欢
JSP -- Introduction to JSP
2021-09-23
MySQL external connection, internal connection, self connection, natural connection, cross connection
源码剖析Redis中如何使用跳表的
低代码和无代码的注意事项
Simple application of parallel search set (red alarm)
Define defines constants and macros, pointers and structures
Servlet3 0 + event driven for high performance long polling
Project manager's thinking mode worth trying: project success equation
5 minutes to understand MySQL row column conversion
随机推荐
mariadb数据库的主从复制
Study notes: unity customsrp-11-post processing --- bloom
2022年最热门的招聘技术技能是什么,您绝对想不到
Barcode generation and decoding, QR code generation and decoding
领域驱动模型DDD(三)——使用Saga管理事务
MFC implementation resources are implemented separately by DLL
What are the most popular recruitment technical skills in 2022? You can't think of it
Summary of MySQL knowledge points
Three of three JS (webgl) simple sorting of rotation attribute function, and a simple case of rotating around the axis based on this
Redis data type usage scenario
Five key technologies to improve the devsecops framework
青岛敏捷之旅,来了!
Using MySQL with Oracle
Discussion on flow restriction
C#测试调用PaddleSharp模块识别图片文字
无线网怎么用手机验证码登录解决方案
即将毕业的大学生找技术开发工作的焦虑根源
Interesting prime number problem hdu5750
Study notes: unity customsrp-10-point and spot shadows
Collaboration future object and concurrent futures