16、Semantic-UI之模态窗口
16.1 定义模态窗口
示例:定义基础的模态窗口
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Semantic UI </title>
<!-- 使用CDN导入js和css 文件-->
<link href="https://cdn.bootcss.com/semantic-ui/2.3.1/semantic.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdn.bootcss.com/semantic-ui/2.3.1/semantic.js"></script>
<script>
$(function () {
$(".ui.green.button").on("click",function () {
$(".ui.modal").modal("show");
})
})
</script>
</head>
<body style="padding: 20px;">
<div class="ui container">
<div class="ui modal">
<div class="header"><i class="user icon"></i>用户信息</div>
<div class="content">
<p>Staryjie,您好,欢迎来到XXXX!</p>
</div>
</div>
<button class="ui green button">查看</button>
</div>
</body>
</html>
示例:为模态窗口添加关闭按钮
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Semantic UI </title>
<!-- 使用CDN导入js和css 文件-->
<link href="https://cdn.bootcss.com/semantic-ui/2.3.1/semantic.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdn.bootcss.com/semantic-ui/2.3.1/semantic.js"></script>
<script>
$(function () {
$(".ui.green.button").on("click",function () {
$(".ui.modal").modal("show");
})
})
</script>
</head>
<body style="padding: 20px;">
<div class="ui container">
<div class="ui modal">
<i class="close icon"></i>
<div class="header"><i class="user icon"></i>用户信息</div>
<div class="content">
<p>Staryjie,您好,欢迎来到XXXX!</p>
</div>
</div>
<button class="ui green button">查看</button>
</div>
</body>
</html>
示例:设置模态窗口的大小
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Semantic UI </title>
<!-- 使用CDN导入js和css 文件-->
<link href="https://cdn.bootcss.com/semantic-ui/2.3.1/semantic.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdn.bootcss.com/semantic-ui/2.3.1/semantic.js"></script>
<script>
$(function () {
$(".ui.green.button").on("click",function () {
$(".ui.modal").modal("show");
})
})
</script>
</head>
<body style="padding: 20px;">
<div class="ui container">
<div class="ui tiny modal">
<i class="close icon"></i>
<div class="header"><i class="user icon"></i>用户信息</div>
<div class="content">
<p>Staryjie,您好,欢迎来到XXXX!</p>
</div>
</div>
<button class="ui green button">查看</button>
</div>
</body>
</html>
16、Semantic-UI之模态窗口的更多相关文章
- Qt 之 模态、非模态、半模态窗口的介绍及 实现QDialog的exec()方法
一.简述 先简单介绍一下模态与非模态对话框. 模态对话框 简单一点讲就是在弹出模态对话框时,除了该对话框整个应用程序窗口都无法接受用户响应,处于等待状态,直到模态对话框被关闭.这时一般需要点击对话框中 ...
- 模态窗口原理及注意事项--http://www.alisdn.com/wordpress/?p=53
前言 在开发Windows引用程序的时候,在一些需要用户确认,或者提示用户注意的场合,经常使用模态对话框,或者叫模态窗口.在绝大多数情况下,模态窗口给开发人员带来了极大的便利,并且在某些应用上有不可替 ...
- Semantic UI 语义化设计的前端框架
UI是Web的灵魂!Semantic UI是一款语义化设计的前端框架,为攻城师而制作的可复用的开源前端框架. 特性 弃用有歧义的表述 Semantic是围绕自然交流语言而架构的,这使得开发更加直观(易 ...
- 15款最好的 jQuery Modal(模态窗口)插件
jQuery 模态窗口插件帮助网站开发人员显示网页中的特定内容,让用户聚焦到这个地方.模态窗口是嵌入到当前网页中,不用重定向到新网页的弹出窗口.这种技术可以用在图像画廊,电子商务网站,登陆框,电子邮件 ...
- 十、ios 模态窗口[实例]
一.模态窗口概念 对话框一般分为两种类型:模态类型( modal )与非模态类型( modeless ).所谓模态对话框,就是指除非采取有效的关闭手段,用户的鼠标焦点或者输入光标将一直停留在其上的对话 ...
- 第16讲- UI组件之TextView
第16讲 UI组件之TextView Android系统所有UI类都是建立在View和ViewGroup这两类的基础上的. 所有View的子类称为widget:所有ViewGroup的子类称为Layo ...
- 使用jQuery创建模态窗口登陆效果
日期:2013-8-22 来源:GBin1.com 隐藏模态窗口技术是一种很好的解决方案,用于处理不是特有必要出现在网页上的界面元素.社交网络可以使用模态窗口传达私人讯息以及只针对会员才能看 到的表 ...
- semantic-ui 模态窗口
模态窗口即加了ui modal的class的div而已,会有点像是alert弹出框的形式,但是美观一点点.
- semantic ui框架学习笔记一
面包屑导航 面包屑导航经常用于多个栏目下的内容管理,是web页面里比较常用的组合.例如: <div class="ui breadcrumb"> <a class ...
随机推荐
- JS中的定时器
在JS中的定时器分两种: 1,setTimeout() 2,setInterval() setTimeout(): 只在指定时间后执行一次: function hello(){ alert('hell ...
- 读《分布式一致性原理》JAVA客户端API操作
创建会话 客户端可以通过创建一个Zookeeper实例来连接服务器.4种构造方法如下 ZooKeeper(connectString, sessionTimeout, watcher): ZooKee ...
- c#中如何获取本机用户名、MAC地址、IP地址、硬盘ID、CPU序列号、系统名称、物理内存
我们在利用C#开发桌面程序(Winform)程序的时候, 经常需要获取一些跟系统相关的信息, 以下这些代码获取能有些用处. c#中如何获取本机用户名.MAC地址.IP地址.硬盘ID.CPU序列号.系统 ...
- AnimatorController即动画控制器创建的BUG
//-------------------------------------------------------------------------------------------------- ...
- Elasticsearch-PHP 索引操作
索引操作 本节通过客户端来介绍一下索引API的各种操作.索引操作包含任何管理索引本身(例如,创建索引,删除索引,更改映射等等). 我们通过一些常见的操作的代码片段来介绍,然后在表格中列出剩下的方法.R ...
- java 多线程下载文件 以及URLConnection和HttpURLConnection的区别
使用 HttpURLConnection 实现多线程下载文件 注意GET大写//http public class MultiThreadDownload { public static void m ...
- 【HDU1542】Atlantis
题意 给出n个矩形的左下角和右上角的坐标,计算总的面积(相交部分只算一次). 分析 线段树扫描线的模板题. 将每个矩形都拆成上下两条线段,然后从下网上扫,当遇到底边时就加上这个区间,遇到顶边时,就减去 ...
- 依靠反射来个Dbutils
闲来无事,写个dbutils玩玩,不完善,满足基本增删改查,上代码 1.Dbutils package db; import annotation.Table; import java.util.*; ...
- Gson 是google解析Json的一个开源框架,同类的框架fastJson,JackJson
Gson 是google解析Json的一个开源框架,同类的框架fastJson,JackJson等等 本人fastJson用了两年,也是从去年才开始接触Gson,希望下面的总结会对博友有用,至于Gso ...
- Intellij IDEA 安装插件 报 ‘plugin xxxx is incompatible‘ 解决方案
网上下载安装LOMBOK失败,直接下载插件安装: 在离线安装IDEA插件的时候,可能会出现该问题.引起的原因主要就是版本号不一致. 下面介绍下离线安装找到合适的版本号. 1.在IDEA的help-&g ...