如何自定义 twitter bootstrap CSS 的默认值?例如类=容器 [英] how can i customize default values of twitter bootstrap CSS? e.g class=container

查看:30
本文介绍了如何自定义 twitter bootstrap CSS 的默认值?例如类=容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的标签中,我放置了bootstrap.css的位置

in my <head> tags, ive placed the location of bootstrap.css

如果我放置 <div class="container"> 它会创建一个固定的宽度.我想要发生的是通过导入另一组样式表来操作 container 宽度的默认值.

if i place <div class="container"> it creates a fixed width. what i wanted to happen is manipulate the default values of the container width by importing another set of stylesheet.

另一种情况是,如果我放置了一个 span8,我如何在不实际编辑 bootstrap.css 的情况下为其添加背景颜色,而是使用新的样式表对其进行自定义.

another scenario is, if i placed a span8 how do i put background colors on it without actually editing the bootstrap.css rather, customize it using a new stylesheet.

是否可以放置 2 个样式表?然后在新样式表中继承/操作 bootstrap.css 中的所有值?

does putting 2 stylesheet possible? then inherit / manipulate all values in the bootstrap.css in a new stylesheet?

如果我的解释不够清楚,我深表歉意.有点难以口头表达我想要发生的事情.:)

i apologize if my explanation aren't that clear. its kinda hard to express verbally what i wanted to happen. :)

推荐答案

是的,这是可能的.这就是 CSS 的级联"部分.简短的回答是在 bootstrap.css 之后和responsive.css 之前添加您自己的样式表,并且您的样式将被使用,因为它们是最新定义,即规则级联"向下.

Yes it is possible. That is what the "Cascading" part of CSS is. Short answer is to add your own style sheet after the bootstrap.css and before the responsive.css and your styles will be used because they are the latest definition, i.e. the rules "cascade" down.

长答案是查看文档.如果你有时间,那里有很多东西要学.

Long answer is take a look at the docs. There's a lot to learn there if you have the time.

另请查看引导程序自定义页面

这篇关于如何自定义 twitter bootstrap CSS 的默认值?例如类=容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆