按钮

Bootstrap常用的自带插件

这一生的挚爱 提交于 2020-03-11 15:00:15
Bootstrap自带的那些常用插件。 模态框 模态框的HTML代码放置的位置 务必将模态框的HTML代码放在文档的最高层级内(也就是说,尽量作为 body 标签的直接子元素),以避免其他组件影响模态框的展现和/或功能。 HTML代码: <!-- 触发模态框的按钮 --> <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> Launch demo modal </button> <!-- 模态框 --> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class=

bootstrap模态框手动开启关闭与设置点击外部不关闭

一个人想着一个人 提交于 2020-03-11 14:57:01
完整的参考菜鸟教程: http://www.runoob.com/bootstrap/bootstrap-modal-plugin.html 1.手动开启与关闭模态框的方法 按钮开启与JS函数开启(2种) <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Bootstrap 实例 - 模态框(Modal)插件</title> <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script> <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <h2>创建模态框(Modal)</h2> <!-- 按钮触发模态框 --> <button class="btn btn-primary btn-lg" data-toggle="modal" data

Bootstrap之BootstrapDialog

那年仲夏 提交于 2020-03-11 14:52:49
Make use of Bootstrap's modal more monkey-friendly. 参考地址: http://nakupanda.github.io/bootstrap3-dialog/ 模态弹框: <div class="modal fade"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Modal title</h4> </div> <div class="modal-body"> <p>One fine body…</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div><!--

Python之tkinter 变量类别

会有一股神秘感。 提交于 2020-03-11 14:41:52
文章目录 一、变量类别的基本简介 二、set() 方法 三、get() 方法 四、追踪trace() 使用模式 w 五、追踪trace() 使用模式 r 六、trace() 方法调用的方法参数 一、变量类别的基本简介 有些控件在 执行时 会更改内容,例如,文本框(Entry),选项按钮(Radio button)等,选项按钮就是选择按钮,多选单选啥的 有些控件我们可以更改他们的内容,例如标签(Label)等,如果想要更改他们的内容,可以使用这些控件的参数,例如, textvariable 、 variable 、 onvalue 等 不过要将控件的参数以变量方式处理时,需要借助 tkinter模块 内的 变量类别 (Variable Classes)。 这个类别有4个子类别,每一个类别其实就是一个数据类型的构造方法,我们可以通过这4个子类别的数据类型将他们与控件相关的参数结合 x = Int Var(): 整型 变量,默认是0 x = Double Var(): 浮点型 变量,默认是0.0 x = String Var(): 字符串 变量,默认是"" x = Boolean Var(): 布尔型 变量,True是1,False是0 二、set() 方法 使用set()方法设置变量内容 import tkinter # 控制显示的开关 msg = False def click (

【Qt学习】---- 实战|圆形按钮

折月煮酒 提交于 2020-03-11 13:17:45
Qt中如何将按钮设置为圆形 MyButton . resize ( 40 , 40 ) ; //设置按钮大小, 这里按钮长40,宽40 MyButton . setStyleSheet ( "border-radius:20px" ) ; //设置按钮样式表,边界半径为20 首先将 resize 内部两个参数设置一样,先变成正方形 然后 将 border-radius 的值设置成 正方形边长的一半,编译运行后就是一个圆形按钮。 按钮大小改变 resize 和 border-radius 的值即可 来源: CSDN 作者: 伊 娃 链接: https://blog.csdn.net/wyifan_/article/details/104791758

UGUI 事件系统

廉价感情. 提交于 2020-03-11 12:20:55
当我们在场景中创建任一UI对象后,Hierarchy面板中都可以看到系统自动创建了EventSystem对象,EventSystem对象负责管理所有事件相关对象,该对象下挂载了EventSystem组件和StandaloneInputModule组件,前者为管理脚本,后者为输入模块。Canvas对象下挂载了GraphicRaycaster负责处理射线相关运算,用户的操作都会通过射线检测来映射到UGUI组件上,InputModule将用户的操作转化为射线检测,Raycaster则找到目标对象并通知EventSystem,最后EventSystem发送事件让目标对象进行响应。 总结来说就是:EventSystem负责管理,BaseInputModule负责输入,BaseRaycaster负责确定目标对象,目标对象负责接收事件并处理,然后一个完整的事件系统就有了 一:EventSystem事件系统 一个场景中只能有一个EventSystem组件 ——First Selected:第一次默认选择的物体 ——Send Navigation Events:是否可以使用导航事件(键盘上下左右)控制 ——Drag Threshold:视为拖拽操作的最小距离 二:EventInterface事件接口 (实现Tooltip) ——IPointerEnterHandler 鼠标进入时响应 —

[WPF]auto和*总结

爷,独闯天下 提交于 2020-03-11 11:53:47
Auto和*效果 Auto 表示自动适应显示内容的宽度, 控件有多大,就显示多大。 * 则表示按比例来分配宽度。 话不多说,直接上例子理解 例子1 代码: <Grid ShowGridLines="True"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <!--控件--> <Button Grid.Row="0" Content="Auto按钮"/> <Button Grid.Row="1" Content="*按钮"/> <Button Grid.Row="2" Content="Auto按钮"/> <Button Grid.Row="3" Content="*按钮"/> </Grid> 可以看出,Auto表示自动适应控件的宽度,按钮默认多大就显示多大,而剩余的区域则由*去分配,由此可能导致出现一个问题,看下面这个例子。 例子2 代码: //XAML部分代码: <Grid ShowGridLines="True"> <Grid.RowDefinitions> <RowDefinition Height

jQuery获得内容和属性

寵の児 提交于 2020-03-11 01:03:19
jquery通过id和attr方法获取a标签的href属性的地址,并实现跳转: < ! DOCTYPE html > < html > < head > < script src = "/jquery/jquery-1.11.1.min.js" > < / script > < script > $ ( document ) . ready ( function ( ) { $ ( "button" ) . click ( function ( ) { window . open ( $ ( "#baidu" ) . attr ( "href" ) , '_self' ) ; } ) ; } ) ; < / script > < / head > < body > < p > < a href = "http://www.baidu.com" id = "baidu" > 百度 < / a > < / p > < button > 跳转到百度 < / button > < / body > < / html > 来源: CSDN 作者: 新一、 链接: https://blog.csdn.net/qq_41153943/article/details/104784086

react绑定事件处理函数this

别等时光非礼了梦想. 提交于 2020-03-10 19:42:48
import React from 'react'; class Home extends React.Component { constructor() { super() this.state = { userInfo: '张三', userAge: 30, list: [ { title: "张三12 " }, { title: "张三123 " }, { title: "张三1234 " }, { title: "张三12345 " } ], } } run() { alert(1) } run1() { alert(this.state.userInfo) } run2 = () => { alert(this.state.userAge) } render() { let listResult = this.state.list.map((value, key) => { return <li key={key}>{value.title}</li> }) return ( <div> <p>{this.state.userInfo}</p> <ul> {listResult} </ul> <button onClick={this.run}>点击</button> <button onClick={this.run1.bind(this)}>改变this指向<

Laravel5.1 搭建简单的社区(三)--展示数据

走远了吗. 提交于 2020-03-10 18:53:34
上篇笔记忘了在模型中声明关联方法,现在补上: 在Discussion模型中声明方法: // 关联到User public function user() { return $this->belongsTo(User::class); } 在User中声明方法: // 关联Discussion public function discussions() { return $this->hasMany(Discussion::class); } 设计首页 展示数据 首先我们创建一个PostsController php artisan make:controller PostsController 注册一条路由: Route::controller('/', 'PostsController'); 编写前端页面,生成app.blade.php: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Laravel App</title> <link rel="stylesheet" href="/css/bootstrap.css"> </head> <body> @yield('content') </body> </html> 我们现在需要一个导航栏,我们可以在bootstrap官网中的 “起步”