html - 自定义 CSS 不会覆盖默认的 Bootstrap CSS

标签 html css twitter-bootstrap

我是 HTML 和 CSS 的新手,我被困在这里......

网站是:http://www.i1cevic.com/

基本上,“粗体文本”不会是我在 CSS 中定义的 font-size:

h1 {
font-family: 'Montserrat', sans-serif;
font-weight: 700;
line-height: 1.05;
letter-spacing: -2.7px;
font-size: 89px;
}




h1 small {

font-family: 'Raleway', sans-serif;
font-weight: 300;
letter-spacing: -2.7px;
font-size: 70px;

}

我遇到问题的类是 h1,如您所见,font-size 被定义为 89px 但它一直显示Bootstrap 的默认 h1 大小:35-36px 或其他,我通过在 font-size: 89px 之后写 !important 来解决这个问题 但这不是解决方案......

这是 HTML 代码。 (不包括头部部分)

<body id="page-top">
<header>
    <div class="header-content">
        <h1><small><font color="black">Light Text</font></small></h1>
        <h1><font color="black">Bold Text</font></h1>
        <br>
        <a class="btn btn-primary btn-xl page-scroll" href="#about">Find
        Out More</a>
    </div>
</header>
<!-- jQuery -->
<script src="js/jquery.js">
</script>
<!-- Bootstrap Core JavaScript -->

<script src="js/bootstrap.min.js">
</script>
<!-- Plugin JavaScript -->

<script src="js/jquery.easing.min.js">
</script>
<script src="js/jquery.fittext.js">
</script>
<script src="js/wow.min.js">
</script>
<!-- Custom Theme JavaScript -->

<script src="js/creative.js">
</script>
</body>
</html>

最佳答案

您标记了这个根据页面大小调整文本大小的“jquery.fittext.js”脚本,很自然地您遇到了这个问题。此脚本将标签“h1”添加到“字体大小”。

关于html - 自定义 CSS 不会覆盖默认的 Bootstrap CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35830262/

相关文章:

html - Sidebaroverlapping 在内容占位符中创建的 Div,我该如何防止它?

css - 如何计算类型的 REM?

html - 大纲 :none is not working on input tags

css - 网页中的可滚动容器

jquery - 是否可以有一个带输入组的按钮单选组?

css - 使所有列表组元素的大小相同

javascript - 当前元素聚焦在 Owl Carousel 中时如何显示标题 div?

JavaScript 和 html : opacity change causing unexpected behaviour

javascript - 在哪里可以找到窗口 API 列表?

Jquery 函数仅在点击 2 次后运行