个人备案的网站 做企业站,刷赞网站推广ks,it培训机构排行榜,做美篇发网站bootstrap1. bootstrap 简单介绍2. demo演示3. 关于bootstrap使用注意的点1. bootstrap 简单介绍
起源 来自Twitter#xff0c;是目前最受欢迎的前端框架。基于HTML、CSS、Javascript。Bootstrap js组件依赖于jquery 3.X简洁灵活#xff0c;使得Web开发更加快捷。官网 https…
bootstrap1. bootstrap 简单介绍2. demo演示3. 关于bootstrap使用注意的点1. bootstrap 简单介绍
起源 来自Twitter是目前最受欢迎的前端框架。基于HTML、CSS、Javascript。Bootstrap js组件依赖于jquery 3.X简洁灵活使得Web开发更加快捷。官网 https://getbootstrap.com/中文文档网站 https://v3.bootcss.com/cdn引入
!-- CSS only --
link relstylesheet hrefhttps://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css integritysha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoPVmmDGMN5t9UJ0Z crossoriginanonymous!-- JS, Popper.js, and jQuery --
script srchttps://code.jquery.com/jquery-3.5.1.slim.min.js integritysha384-DfXdz2htPH0lsSSs5nCTpuj/zy4COGpamoFVy38MVBnEIbbVYUewOrCXaRkfj crossoriginanonymous/script
script srchttps://cdn.jsdelivr.net/npm/popper.js1.16.1/dist/umd/popper.min.js integritysha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU6BZp6G7niu735Sk7lN crossoriginanonymous/script
script srchttps://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js integritysha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMVrV crossoriginanonymous/script页面引入 // css样式link relstylesheet hrefcss/bootstrap.css /// bootstrap js组件 依赖jQueryscript typetext/javascript srcjs/jquery-3.4.1.js /script// bootstrap js组件操作script typetext/javascript srcjs/bootstrap.js /script2. demo演示
下拉框按钮 组件
!DOCTYPE html
htmlheadmeta charsetUTF-8title/titlelink relstylesheet href../css/bootstrap.css /script typetext/javascript src../../js/jquery-3.4.1.js /scriptscript typetext/javascript src../js/bootstrap.js /scriptscript$(function() {// ready..});/script/headbody!-- 下拉框按钮 --div classbtn-groupbutton typebutton classbtn btn-default dropdown-toggle data-toggledropdown aria-haspopuptrue aria-expandedfalsedo sth.. span classcaret/span/buttonul classdropdown-menulia href#菜单/a/lilia href#跳转/a/lilia href#修改/a/lili roleseparator classdivider/lilia href#新增/a/li/ul/div/body
/html 2. js插件结合jQuery模态框 modal
!DOCTYPE html
htmlheadmeta charsetUTF-8title/titlelink relstylesheet href../css/bootstrap.css /script typetext/javascript src../../js/jquery-3.4.1.js /scriptscript typetext/javascript src../js/bootstrap.js /scriptscript$(function() {// ready..$(#save).on(click, function() {// 隐藏模态框$(#myModal).modal(hide);});});/script/headbody!-- Button trigger modal 按钮触发模态框 data-target:取到对应的模态框--button typebutton classbtn btn-primary btn-lg data-togglemodal data-target#myModal弹出模态框/button!-- Modal 模态框 不显示 通过js触发 弹出 --div classmodal fade idmyModal tabindex-1 roledialog aria-labelledbymyModalLabeldiv classmodal-dialog roledocumentdiv classmodal-contentdiv classmodal-headerbutton typebutton classclose data-dismissmodal aria-labelClosespan aria-hiddentruetimes;/span/buttonh4 classmodal-title idmyModalLabel请填写您的信息/h4/divdiv classmodal-bodywirte some html code... br/email: input typetext //divdiv classmodal-footerbutton typebutton classbtn btn-default data-dismissmodal关闭/buttonbutton typebutton classbtn btn-primary idsave保存/button/div/div/div/div/body
/html 3. 关于更多例子学习请看中文文档 https://v3.bootcss.com/ 多查文档多copy
3. 关于bootstrap使用注意的点
和其它框架使用如vue.js 注意效果会影响不兼容不支持h5的浏览器导入第三方js包 html5shiv.jsrespond.js保证bootstrap的样式在不同的浏览器中保持一致 Normalize.css 可选引入