加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

如何仅使用bootstrap的模态对话框,而不是整个bootstrap.css与我

发布时间:2020-12-17 21:20:10 所属栏目:安全 来源:网络整理
导读:如何仅使用bootstrap的模态对话框,而不是整个bootstrap.css与我自己的CSS冲突. 我知道也许使用fancybox是一个更好的解决方案,但我只想要bootstrap的模态窗口的风格.. 解决方法 只需在bootstrap.css文件后包含CSS即可.最后一个是CSS中使用的. 如果你担心输入
如何仅使用bootstrap的模态对话框,而不是整个bootstrap.css与我自己的CSS冲突.

我知道也许使用fancybox是一个更好的解决方案,但我只想要bootstrap的模态窗口的风格..

解决方法

只需在bootstrap.css文件后包含CSS即可.最后一个是CSS中使用的.

如果你担心输入或div等元素特定的css规则,那么只需重置css文件开头的所有内容.

谷歌CSS重置并发现:

/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,section {
    display: block;
}
body {
    line-height: 1;
}
ol,ul {
    list-style: none;
}
blockquote,q {
    quotes: none;
}
blockquote:before,blockquote:after,q:before,q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}

从那里你可以简单地定制一些东西,如文本/链接颜色和悬停等,但引导程序中的大部分CSS都与类一起使用,因此人们可以使用它自定义css.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读