Symfony4无法使用bootstrap4修改FOSUser按钮

时间:2018-12-26 15:22:47

标签: bootstrap-4 symfony4

我想修改FOSUser注册表中的“提交”按钮,以便使用引导程序4中的btn btn-primary。

但是我不能成功。

他在那里:

<div class="fos_registration_row">
    <div class="fos_registration_label"></div>
    <div class="fos_registration_input">
        <button type="submit" class="btn btn-primary">S'enregistrer</button>
    </div>
</div>

有我添加的所有自定义CSS

body {
    background-color: lightgray;
}

.fos_registration{
    margin-right: auto;
    margin-left: auto;
    border-radius: 10px;
    border: 2px solid black;
    background: linear-gradient(blue, white);
    width:50%;
}

.fos_registration_title{
    text-align: center;
}

.fos_registration_row{
    margin-left:15%;
    margin-top: 2%;
    margin-bottom: 2%;
}

.fos_registration_label{
    display: inline-block;
    width: 30%;
}

.fos_registration_input{
    width: 50%;
    display: inline-block;
}

input{
    border-radius: 10px;
    background-color: lightgrey;
}

这是我所拥有的屏幕截图

register page screen

如果您认为有帮助,请随时询问我更多信息。我是CSS的新手,所以我可能忘记了重要的东西

编辑:

这是我的package.json,以便您检查引导程序是否安装正确。

{
    "devDependencies": {
        "@symfony/webpack-encore": "^0.22.0",
        "jquery.js": "^0.0.2-security",
        "popper.js": "^1.14.6",
        "webpack-notifier": "^1.6.0"
    },
    "license": "UNLICENSED",
    "private": true,
    "scripts": {
        "dev-server": "encore dev-server",
        "dev": "encore dev",
        "watch": "encore dev --watch",
        "build": "encore production --progress"
    },
    "dependencies": {
        "bootstrap": "^4.2.1",
        "jquery": "^3.3.1"
    }
}

感谢您的帮助

0 个答案:

没有答案