当前位置: 首页 > wzjs >正文

怎么做淘宝客导购网站莱阳seo排名

怎么做淘宝客导购网站,莱阳seo排名,wordpress 标签图标,襄阳做网站排行榜Bootstrap V4 学习入门教程之 组件-警告框(Alert) 警告框(Alert)一、示例二、链接的颜色三、添加其它内容四、关闭警告框 通过 JavaScript 触发行为触发器本组件所暴露的事件 警告框(Alert) 通过精炼且灵活…

Bootstrap V4 学习入门教程之 组件-警告框(Alert)

  • 警告框(Alert)
    • 一、示例
    • 二、链接的颜色
    • 三、添加其它内容
    • 四、关闭警告框
  • 通过 JavaScript 触发行为
    • 触发器
    • 本组件所暴露的事件

警告框(Alert)

通过精炼且灵活的警告消息为典型的用户操作提供契合上下文的反馈。

一、示例

警告框(alert)组件能够展示任意长度的文本以及一个可选的关闭按钮。为了展示合适的样式,必须 从下列 8 个情境类(例如 .alert-success)中选择一个合适的并使用。如需内联一个关闭按钮,请使用 警告框(alert)的 JavaScript 插件

<div class="alert alert-primary" role="alert">A simple primary alert—check it out!
</div>
<div class="alert alert-secondary" role="alert">A simple secondary alert—check it out!
</div>
<div class="alert alert-success" role="alert">A simple success alert—check it out!
</div>
<div class="alert alert-danger" role="alert">A simple danger alert—check it out!
</div>
<div class="alert alert-warning" role="alert">A simple warning alert—check it out!
</div>
<div class="alert alert-info" role="alert">A simple info alert—check it out!
</div>
<div class="alert alert-light" role="alert">A simple light alert—check it out!
</div>
<div class="alert alert-dark" role="alert">A simple dark alert—check it out!
</div>

页面展示效果:
在这里插入图片描述

二、链接的颜色

通过使用 .alert-link 工具类可以为任何警告框(alert)组件添加颜色相匹配的链接。

<div class="alert alert-primary" role="alert">A simple primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-secondary" role="alert">A simple secondary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-success" role="alert">A simple success alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-danger" role="alert">A simple danger alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-warning" role="alert">A simple warning alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-info" role="alert">A simple info alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-light" role="alert">A simple light alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-dark" role="alert">A simple dark alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>

页面展示效果:
在这里插入图片描述

三、添加其它内容

警告框(alert)组件还可以包含其它 HTML 元素,例如标题、段落、分割线等。

<div class="alert alert-success" role="alert"><h4 class="alert-heading">Well done!</h4><p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p><hr><p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
</div>

页面展示效果:
在这里插入图片描述

四、关闭警告框

通过使用警告框(alert)组件的 JavaScript 插件,可以为任何警告框(alert)组件添加内联的关闭按钮。步骤如下:

  • 确保已加载了警告框(alert)组件的 JavaScript 插件。
  • 添加关闭按钮和 .alert-dismissible 类,这将在警告框(alert)组件的右侧增加额外的空间并放置关闭按钮( .close)。
  • 在关闭按钮上添加 data-dismiss="alert" 属性,该属性会触发 JavaScript 代码。请务必使用 <button> 元素,以确保在所有设备上都具有正确的行为。
  • 如需在关闭警告框(alert)时展示动画效果,请确保添加 .fade.show
<div class="alert alert-warning alert-dismissible fade show" role="alert"><strong>Holy guacamole!</strong> You should check in on some of those fields below.<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>

页面展示效果:
在这里插入图片描述

通过 JavaScript 触发行为

触发器

通过 JavaScript 代码关闭警告框(alert):

$('.alert').alert('close')

或者在 警告框(alert)组件内 添加一个按钮,并为按钮设置相应的 data 属性,如下所示:

<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span>
</button>

请注意,关闭的警告框(alert)将被从 DOM 中删除。

本组件所暴露的事件

Bootstrap 的警告框(alert)插件暴露了一些可以监听的事件。

事件描述
close.bs.alertclose 实例方法被调用时,该事件被立即触发。
closed.bs.alert当警告框(alert)已关闭时(并将等待 CSS transitions 执行完),该事件将被触发。
$('#myAlert').on('closed.bs.alert', function () {// do something...
})
http://www.dtcms.com/wzjs/131190.html

相关文章:

  • 青海网站 建设中国网络优化公司排名
  • 个人网站心得中国互联网协会官网
  • 平谷网站建设服务百度浏览器手机版
  • 昆山做网站怎么做泰安网站制作推广
  • 网站建设 创新百度竞价点击价格公式
  • 网站建设在开封找谁做百度搜索热度排名
  • mac机怎么装wordpress网络优化这个行业怎么样
  • 密云做网站企业品牌类网站有哪些
  • 建企业网站一般多少钱优化大师电视版
  • 杨浦网站建设公司百度搜索风云榜小说排行榜
  • 如何快速做企业网站包括商城世界杯比分
  • 网站创建要多少钱建站公司
  • 社区网站优化营业推广方案怎么写
  • 网站开发及上线过程最近的国际新闻大事
  • 网站建设费用大概多少郑州百度快照优化
  • 网站制作性价比哪家好打广告推广怎么做
  • 做房产抵押网站需要什么手续游戏推广代理平台
  • 天水网站制作百度推广竞价开户
  • e福州首页河南网站seo
  • wordpress模板编辑首页杭州优化公司哪家好
  • 普洱做网站的报价手机网站模板免费下载
  • 网站后台怎么添加栏目榆林seo
  • 专业的培训行业网站制作友情链接英语
  • 网站开发安全文档深圳企业网站制作公司
  • 香港公司建网站如何在各大平台推广
  • seo人员要先对网站进行诊断兰州网络推广与营销
  • 莆田个人外贸网站建设360收录批量查询
  • 好视通视频会议app下载安装优化近义词
  • 做海报哪个网站的素材多seo在线网站推广
  • 黑龙省建设厅网站首页郑州seo公司排名