gpt4 book ai didi

javascript - 在 Grails 中引用 CSS 文件和 JS 文件 - twitter-bootstrap

转载 作者:行者123 更新时间:2023-12-03 12:38:36 26 4
gpt4 key购买 nike

我创建了一个 Grails 项目。现在我想使用 twitter-bootstrap 。我已成功安装bootstrap。但我想知道如何引用index.html页面

中的以下3个链接
<r:require modules="bootstrap" />
<r:layoutResources />
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet"
href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet"
href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">

<!-- Latest compiled and minified JavaScript -->
<script
src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>

最佳答案

如果您安装了bootstrap插件,您只需要调用所需的模块

BuidConfig.groovy

compile ":twitter-bootstrap:2.3.2"

然后在您的GSP

<r:require modules='bootstrap-css, bootstrap-js, bootstrap-modal, ...'/>

关于javascript - 在 Grails 中引用 CSS 文件和 JS 文件 - twitter-bootstrap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23614564/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com