layui弹出层样式修改,使用css的background属性设置多个背景图

效果图
由于头部设计成渐变色,在拉伸之后,连接处有瑕疵,建议在设计时进行规避。
在这里插入图片描述
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>
  
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Free2140

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值