Why Bootstrap CSS is not overriding in other project with the same code?

后端 未结 3 1280
遥遥无期
遥遥无期 2021-01-25 10:23

I have such problem. I\'m working with project, but when I copy the same files from server it looks different - some Bootstrap styling is not overrided.

Here is screensh

3条回答
  •  隐瞒了意图╮
    2021-01-25 10:54

    Your styles are probably not overriding because you need to override several instances of a property.

    You haven't provided us with any of the code you are trying to override with, so I can't say for sure, but in the above code, you can't just override box-shadow but -webkit-box-shadow etc.

    This is much easier to do when working with the source LESS files from Bootstrap's Github project where you can define this as

    .box-shadow(1px 1px 5px #e1e1e1);
    

    And it will automatically write out all of these properties for box-shadow.

    Here are Bootstrap's instructions on how to do this: http://twitter.github.com/bootstrap/extend.html

    There's also Kickstrap, which is already set up to do this. It keeps your customizations in a separate layer from Bootstrap so you don't have to touch the source code (also other goodies).

提交回复
热议问题