Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
164 views
in Technique[技术] by (71.8m points)

how can i customize default values of twitter bootstrap CSS? e.g class=container

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

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.

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.

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. :)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

When you add a second stylesheet, you can override rules of the first one. Just make sure you add them to your html page in the right order.

If you want to make sure a rule won't be overridden you can add !important to it. Example:

.example {
    color: red !important;
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...