如何将标签添加到引导对话框页脚 [英] How to add Labels to Bootstrap dialog footer

查看:102
本文介绍了如何将标签添加到引导对话框页脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要在 bootstrap3-dialog 的页脚上添加 bootstrap 标签。根据本教程,只能在页脚区域添加按钮。

Need to add bootstrap label on footer of bootstrap3-dialog. according to this tutorial can add only buttons in footer area.

BootstrapDialog.show({
    title: 'Default Title',
    message: 'Click buttons below.',
    buttons: [{label: 'Title 1'}, {label: 'Title 2'}]
});


推荐答案

熟悉,目标是永远是一个按钮,但有一个标签风格,如下所示:

I think you can handle that with CSS if you are familiar with, the aim is it will always be a button but with a "label" style, something like this :


  1. 添加一个css类对于每个'标签'你想要的:

BootstrapDialog.show({
title:'Default Title',
message:'Click buttons below。',
buttons:[{
label:'Title 1',
cssClass:'buttonAsLabel1'
}, {
label:'Title 2',
cssClass:'buttonAsLabel2'
}]
});


  1. 声明Css类的方式与相关的Bootstrap标签相同
  1. Declare the Css classes the same way as the related Bootstrap label

.buttonAsLabel1 {..}
.buttonAsLabel2 {..}

^

这篇关于如何将标签添加到引导对话框页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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