本文介绍了Bootstrap CSS编辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在我的网站上安装了bootstrap 3.0,并且一直在玩。我有一些关于它的问题;

I just recently installed bootstrap 3.0 onto my site and have been playing around with. I've got a couple questions regarding it;

我想更改jumbotron(和其他类)在我自己的.css文件的某些规格。我有一个名为mycss.css的文件,并添加了以下代码

I want to change certain specifications for the jumbotron (and other classes) in my own .css file. I have a file called "mycss.css" and have added the following code into it

.jumbotron {
    background-image: url();
    padding: 30px;
    margin-bottom: 30px;
    font-size: 21px;
    font-weight: 200;
    line-height: 2.1428571435;
    color: inherit;
    background-color: #eeeeee;
}

在我的index.htm中我声明了我的.css如下bootstrap.min.css declaration);

In my index.htm I have declared my .css as follows (after the bootstrap.min.css declaration);

<link href="css/my.css" rel="stylesheet" media="screen">

但是,这些更改没有反映在我的网站上。

However, these changes are not being reflected on my site. Is there anything else I need to change?

推荐答案

"I have a file called 'mycss.css' "


<link href="css/my.css" rel="stylesheet" media="screen">

这些不匹配。这可能是问题。

These don't match. That could be the problem.

我的回答可能是真正的问题,BUT -

My answer is probably the real problem, BUT -

@ SeWonJang仍然有效,无论它是一个ID或类 - 并且可能是很好的问题。如果我做: .main-content ul {list-style:none} 然后在 .main-content 给一个 my-list ul - 我不能说。我的列表{list-style:disc} ---因为我已经太具体了(或总体) - 我已经说:应用这些规则到任何ul。 -内容。这将赢得 .my-list {list-style:disc} 。现在我不得不说 .main-content .my-list {list-style:disc} 我真的只发​​现这是一个真正的问题类型。因为几乎一切都是一个垃圾列表 - 但然后在文章中我想要一些列表风格---这是我最好的例子。

@SeWonJang's point it still valid whether it is an ID or a class - and could very well be the issue. If I make: .main-content ul {list-style: none} and then somewhere in .main-content give a class of my-list to a ul - I can't just say .my-list {list-style: disc} --- because I've already been too specific(or overarching) - I've already said: "Apply these rules to ANY ul inside of .main-content." This wins over .my-list {list-style: disc}. Now I have to say .main-content .my-list {list-style:disc} I have really only found this to be a real issue with type. Since almost everything ever is a list of crap - but then in the article text I want some list-style --- That is the best example for me.

这篇关于Bootstrap CSS编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 04:47