我有一个文件夹,里面有几个index.html文件,我如何使它显示每个index.html不同的背景?
例如,index1.html显示背景1.png,index2.html显示背景2.png,依此类推
所有这些index.html都依赖于相同的图像和css文件夹,所有的图像都已添加到图像文件中
<section class="u-align-center u-clearfix u-image u-shading u-section-1" src="images/banner.png" id="sec-597c">
<div class="u-clearfix u-sheet u-sheet-1">
<h1 class="u-text u-title u-text-1">tiket</h1>
.u-section-1 {background-image: linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0.55)), url("images"); background-position: 50% 50%}
.u-section-1 .u-sheet-1 {min-height: 634px}
.u-section-1 .u-text-1 {font-weight: 700; font-size: 3.75rem; margin: 142px 484px 0 39px}
.u-section-1 .u-text-2 {margin: 22px 374px 0 52px}
.u-section-1 .u-btn-1 {background-image: none; text-transform: uppercase; font-weight: 700; border-style: none; font-size: 1.5rem; animation-duration: 1000ms; box-shadow: 2px 2px 8px 0 rgba(128,128,128,1); margin: 22px auto 60px 262px; padding: 12px 15px 13px}
您可以为每个页面创建和添加特定的类。
page1.u-section-1{背景图像:线性梯度(0deg,rgba(0,0,0,0.55(,rgba(0,0,0.0.55((,url("图像"(;背景位置:50%50%}
page2.u-section-1{背景图像:线性梯度(0deg,rgba(0,0,0,0.55(,rgba(0,0,0.0.55((,url("images2"(;背景位置:50%50%}