我使用bootstrap构建了一个网站,现在我想使用Bootstrap Material Design theme作为其性感组件。所以我在我的<head>
中包含了css和js,这会立即改变我网站上的很多内容,例如背景和导航栏。
不幸的是我不想使用主题的背景或导航栏。有人知道如何覆盖或“禁用”主题的导航栏和背景吗?
欢迎所有提示!
答案 0 :(得分:1)
您可以通过进入新主题来覆盖它。在新主题的css文件中找到背景和导航栏,只需使用&#34;!important&#34;重写这个。
示例:
# ----------------------------------------
# Factory-Boy User and Group Factories
# ----------------------------------------
from factory import alchemy, Sequence, RelatedFactory
class GroupFactory(alchemy.SQLAlchemyModelFactory):
class Meta(object):
model = Group
sqlalchemy_session = db.session # the SQLAlchemy session object
name = Sequence(lambda n: "Group {}".format(n))
# group_pk = Sequence(lambda n: n)
class UserFactory(alchemy.SQLAlchemyModelFactory):
class Meta(object):
model = User
sqlalchemy_session = db.session # the SQLAlchemy session object
user_pk = Sequence(lambda n: n)
name = Sequence(lambda n: u'User %d' % n) # coding=utf-8
group_fk = RelatedFactory(GroupFactory)
# ----------------------
# Factory tests
# ----------------------
# Create a new Group from our factory
group_from_factory = GroupFactory(name='a new group name')
assert group_from_factory.group_pk is None
# Save it to our DB
db.session.add(group_from_factory)
db.session.commit()
# Verify that Group Saved correctly to DB
group_from_db = db.session.query(Group).filter(Group.group_pk == group_from_factory.group_pk).first()
assert group_from_db.group_pk is not None
assert group_from_db.name == 'a new group name'
assert group_from_db.group_pk == group_from_factory.group_pk
# Create a new User from our factory
user_from_factory = UserFactory()
db.session.add(user_from_factory)
# ----------------------------------------------
# FAILS AT COMMIT() - NOT NULL constraint failed (group_fk is null)
# ----------------------------------------------
db.session.commit()
assert user_from_factory.user_pk is not None
assert user_from_factory.name is not None
assert user_from_factory.group_fk is not None
答案 1 :(得分:1)
找到所有未发送的组件,将它们复制并粘贴到您自己的css文件中,更改值并将其作为最新的包含在标题部分中。希望这有帮助