效果图
由于头部设计成渐变色,在拉伸之后,连接处有瑕疵,建议在设计时进行规避。
1、流程,将窗体划分为九个区
上左:固定宽度,固定高度
上中:计算宽度,固定高度
上右:固定宽度,固定调度
中左:固定宽度,计算高度
中中:计算宽度,计算高度
中右:固定宽度,计算高度
下左:固定宽度,固定高度
下中:计算宽度,固定高度
下右:固定宽度,固定高度
2、切出来所需要的图片。
3、使用!important,去掉原来的样式。
4、使用backgound可以设置多个背景图的特性,设置九个分区的背景图
完整代码
.layui-layer,.layui-layer-title{
background-color: transparent !important;
color: white !important;
border-bottom: 0px solid #eee !important;
}
.layui-layer {
background-image:
url('images/theme/tl.png'),url('images/theme/lc.png'),url('images/theme/lr.png') ,
url('images/theme/cl.png'),url('images/theme/cc.png'),url('images/theme/cr.png'),
url('images/theme/bl.png'),url('images/theme/bc.png'),url('images/theme/br.png');
background-repeat:
no-repeat, no-repeat, no-repeat,
no-repeat, no-repeat, no-repeat,
no-repeat, no-repeat, no-repeat;
background-position:
0 0, 100px 0, calc(100%) 0,
0 130px, 48px 130px, calc(100%) 130px ,
0 calc(100%), 283px calc(100%), calc(100%) calc(100%);
background-size:
100px 130px, calc(100% - 100px - 113px) 130px,113px 130px ,
48px calc(100% - 130px - 42px), calc(100% - 48px - 32px) calc(100% - 130px - 42px),32px calc(100% - 130px - 42px),
283px 42px, calc(100% - 283px - 219px) 42px,219px 42px;
}
.layui-layer {
border-radius: 0px !important;
box-shadow: 0px 0px 0px rgb(0 0 0 / 0%) !important;
}
.layui-layer-content{
border: 0 !important;
}
</style>