前端入门经验——iview下Modal对话框样式修改

  1. 先放一张没有修改过的iview对话框。
    在这里插入图片描述
  2. 修改过的Modal。
    在这里插入图片描述
  3. 代码:
    HTML:
 <Modal v-model="modalGlzcy" class-name="qzcxQzc" :closable="false">
        <!-- <template #header>
            </template> -->
        <div slot="header">
          <div class="yyqd-title">
            <span>管理支撑域</span>
          </div>
        </div>
        //以上两种方式都可以修改title
        <div class="yyqd-content">
        //写入主题HTML代码
        </div>
        <template #footer class="yyqd-footer">
        </template>
      </Modal>

CSS:

.qzcxQzc {
  display: flex;
  justify-content: center;
  align-items: center;
  .ivu-modal {
    top: 0;
    width: 24.3rem !important /* 972px */;
    border: none;
    background: transparent;
  }
  .ivu-modal-content {
    background-color: transparent;
  }
  .yyqd-title {
    width: 8.225rem /* 329px */;
    height: 1.325rem /* 53px */;
    background: url('../../../assets/img/title.png') no-repeat;
    background-size: 100% 100%;
    position: absolute;
    margin-top: -0.7rem;
    left: 50%;
    margin-left: -4.125rem;
    text-align: center;
    line-height: 1.325rem;
    span {
      font-size: 0.55rem;
      font-family: Source Han Sans CN;
      font-weight: bold;
      color: #ffffff;
    }
  }
  .yyqd-content {
    height: 13.7rem /* 548px */;
    background: url('../../../assets/img/tkyyqd@2x.png');
    background-size: 100% 100%;
    padding: 0.5rem 0rem 0.55rem 0.4rem ;
    box-sizing: border-box;
    color: #fff;
    font-size: 0.55rem /* 22px */;
    font-family: Source Han Sans CN;
    color: #ffffff;
    }
  .ivu-modal-footer {
    display: none;
  }
}
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值