HTML继承页面布局 [英] HTML inherit page layout

查看:167
本文介绍了HTML继承页面布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能让一个普通的html页面从另一个html页面继承它的布局?如果是这样,那么做到这一点最可取的方法是什么?
我知道aspx使用.master页面来保存站点中所有页面的通用元素。

Is it possible to have a regular html page inherit its layout from another html page? If so, what is the most advisable approach for doing this? I know that aspx uses .master pages to hold the elements common to all pages in the site.

推荐答案

您如果您绝对不能使用服务器端语言,则可以使用JS和AJAX获取资源。

You could fetch resources using JS and AJAX if you absolutely cannot use a serverside language.

我们如何避免在每个html页面中重复页眉和页脚代码

Jekyll也可以:
在静态HTML网站中管理重复代码的最佳方法是什么

Jekyll works too: What is the best way to manage duplicate code in static HTML websites

这篇关于HTML继承页面布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆