基于Bootstrap的主题与指南针

时间:2018-04-06 10:58:50

标签: css html5 bootstrap-4 compass

我使用以下命令创建了一个指南针项目:

compass create countdowns.io -r bootstrap-sass --using bootstrap --css-dir static/css --javascripts-dir static/jss --images-dir static/images --fonts-dir static/fonts

如果我尝试使用网格它不起作用(.offset-md-4被忽略),而如果我尝试使用,例如,按钮样式,它完全有效。这可能会让我排除没有加载样式。

enter image description here

html代码是这样的:

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
</head>
<body>
    <div class="container">
        <div class="row">
            <div class="col-md-4 offset-md-4">.col-md-4 .offset-md-4</div>
        </div>
        <button class="btn btn-primary">Log me in</button>
    </div>
</body>
</html>

当然styles.css已正确加载,styles.scss内容为:

// Import Bootstrap Compass integration
@import "bootstrap-compass";

// Import custom Bootstrap variables
@import "bootstrap-variables";

// Import Bootstrap for Sass
@import "bootstrap";


div {
    outline: 1px red solid;
}

0 个答案:

没有答案
相关问题