GVKun编程网logo

带有Spring MVC的Twitter Bootstrap(spring for twitter)

9

如果您对带有SpringMVC的TwitterBootstrap感兴趣,那么本文将是一篇不错的选择,我们将为您详在本文中,您将会了解到关于带有SpringMVC的TwitterBootstrap的详细

如果您对带有Spring MVC的Twitter Bootstrap感兴趣,那么本文将是一篇不错的选择,我们将为您详在本文中,您将会了解到关于带有Spring MVC的Twitter Bootstrap的详细内容,我们还将为您解答spring for twitter的相关问题,并且为您提供关于ASP.NET MVC4绑定与Twitter Bootstrap、twitter-bootstrap – angular – 使用PrimeNG和Bootstrap 4、twitter-bootstrap – Bootstrap 3.0.0 – 什么是bootstrap-responsive.css的替代?、twitter-bootstrap – Bootstrap ScrollSpy似乎打破了Bootstrap标签的有价值信息。

本文目录一览:

带有Spring MVC的Twitter Bootstrap(spring for twitter)

带有Spring MVC的Twitter Bootstrap(spring for twitter)

我想将Twitter Bootstrap与现有的Spring
MVC项目集成。搜索不会返回抽象结果,而没有教程或文章概述如何将基于UI的Bootstrap与Spring MVC集成在一起。

在集成框架方面涉及哪些配置步骤?

谢谢

答案1

小编典典

Twitter
Bootstrap是CSS元素的框架,也是一些弹出窗口和HTML技巧。您可以简单地将bootstap.css,jquery.js和bootstrap.js放入现有的Spring
MVC JSP页面中。两者一起使用没有秘密。这很简单。

您可以看一下这些示例。它们可能对您有用。

  • 示例1-priyatam的GitHub Spring MVC引导展示。这是一个很好的项目,是一个完整的项目,可以运行
  • 示例2-Duckranger的Spring MVC和Twitter Bootstap

请记住,Spring
MVC将为您提供所有数据(通过JSON或Model属性)来构建HTML文件。Bootstrap只会个性化页面的主题,有时会调用Spring MVC
REST端点来获取Ajax数据。

ASP.NET MVC4绑定与Twitter Bootstrap

ASP.NET MVC4绑定与Twitter Bootstrap

我试图使用新的捆绑功能在MVC 4与Twitter引导,它似乎在我喜欢的路径到glyphicons png文件int css get在某种程度上搞砸了。我的代码:
bundles.Add(new StyleBundle("~/bundles/publiccss").Include(
            "~/Static/Css/bootstrap/bootstrap.css","~/Static/Css/bootstrap/bootstrap-padding-top.css","~/Static/Css/bootstrap/bootstrap-responsive.css","~/Static/Css/bootstrap/docs.css"));


        bundles.Add(new ScriptBundle("~/bundles/publicjs").Include(
            "~/Static/Js/jquery-1.7.2.js","~/Static/Js/bootstrap/bootstrap.js","~/Static/Js/cookie/jquery.cookie.js"));

我没有看到任何图标按钮和类似。我在这里做错了吗?有什么建议么?

解决方法

问题很可能是css文件中的图标/图像正在使用相对路径,因此,如果您的软件包不与未分类的CSS文件存在于相同的应用程序相对路径中,它们将变为损坏的链接。

我们在我们的todo列表中有css中的rebase urls,但现在,easist要做的是使你的bundle路径看起来像css目录,所以相对urls只是工作,即:

new StyleBundle("~/Static/Css/bootstrap/bundle")

更新:我们已经在1.1beta1版本中添加了对此的支持,因此,为了自动重写图像url,您可以添加一个新的ItemTransform,它会自动进行rebase。

bundles.Add(new StyleBundle("~/bundles/publiccss").Include(
            "~/Static/Css/bootstrap/bootstrap.css","~/Static/Css/bootstrap/docs.css",new CssRewriteUrlTransform()));

twitter-bootstrap – angular – 使用PrimeNG和Bootstrap 4

twitter-bootstrap – angular – 使用PrimeNG和Bootstrap 4

目前,我正在为新的Angular 2项目使用UI-Libraries.我试过Ng-Bootstrap和Material.不幸的是,他们仍处于Alpha和Beta状态.我还检查了PrimeNG.目前,PrimeNG提供了比Material和NgBootstrap更多的组件.尤其是在桌子方面. PrimeNG似乎很稳定,可以用于生产.

我对PrimeNG的网格系统并不满意.例如,不清楚如何执行列偏移.我在文档(https://www.primefaces.org/primeng/#/grid)中也找不到这个.

我开始在PrimeNG组件中使用bootstrap 4.对我来说,这还不是一个好方法.感觉就像我有两个框架在某些情况下做同样的事情.例如,如果我想创建一个按钮,我可以使用bootstrap类来执行以下操作

< button class =“btn btn-primary”>带Bootstrap的按钮< / button>

或者我可以使用PrimeNG执行以下操作

<button pButton type="button" label="Button created with PrimeNG"></button>

我是否缺少PrimeNG的一些功能,或者将Bootstrap与PrimeNG结合使用是有效的,因为它在Grid-Layout方面提供了更多功能.

解决方法

使用Bootstrap和PrimeNG没有任何问题.你仍然可以使用Bootstrap的CSS好东西.但正如你所说,你只想使用Bootstrap的一些功能(比如它的网格系统),而不是你在PrimeNG框架中已有的其他功能,那么我建议自定义Bootstrap.目前还没有官方选项来自定义Bootstrap,就像在Bootstrap 3中一样.但你可以手动完成.只需下载Bootstrap的源代码(带有Sass文件),你可以在其中为Bootstrap的每个功能提供单独的文件,然后你可以注释掉你不想要的文件,如果你不需要它可以用于评论的按钮输出_buttons.scss文件或_modal.scss等.它会为你编译CSS文件,它只包含你想要的CSS.但为此你需要掌握一些关于SASS的基本知识.

twitter-bootstrap – Bootstrap 3.0.0 – 什么是bootstrap-responsive.css的替代?

twitter-bootstrap – Bootstrap 3.0.0 – 什么是bootstrap-responsive.css的替代?

在我的应用程序升级到bootstrap 3.0.0从引导2.3.2之后,它的布局不是很好,似乎是因为在最新版本中缺少引导响应。有没有人知道这里的解决方法?在引导文档中似乎没有什么(至少我找不到)

解决方法

在Bootstrap 3.0中,没有必要的css。报价 migration guide:

“Mobile first” is a responsive Web design practice that prioritizes consideration of smart phones and mobile devices when creating Web pages. For Bootstrap 3,there is no longer a separate bootstrap-responsive.css file. All responsive features are Now compiled into a single core bootstrap.css file.

twitter-bootstrap – Bootstrap ScrollSpy似乎打破了Bootstrap标签

twitter-bootstrap – Bootstrap ScrollSpy似乎打破了Bootstrap标签

我一直在尝试在使用选项卡的页面上实现ScrollSpy.

这是我的身体标签:

<body data-spy="scroll" data-target=".subnav" data-offset="50">

这是我的标签HTML:

<div>
    <ulid="myTab">
        <li><a href="" data-toggle="tab" data-target="#home">Home</a></li>
        <li><a href="" data-toggle="tab" data-target="#profile">Profile</a></li>
    </ul>
    <div id="myTabContent">
        <divid="home">
            <div>
                   ...
            </div>
            <div>
                <a href="#"><i></i>Button</a> <a href="#">
                    <i></i>Button</a> <a href="#">Button</a>
                <a href="#">Button</a> <a href="#">Button</a>
            </div>
        </div>
        <divid="profile">
            <div>
               ...
            </div>
            <div>
               <a href="#">Button</a>
                <a href="#">Button</a> <a href="#">Button</a>
            </div>
        </div>
    </div>
</div>

如果我从标签中删除data-spy =“scroll”data-target =“.subnav”data-offset =“50”,我的标签工作正常.启用scrollspy后,我在Chrome开发工具中收到此错误:

未捕获的TypeError:无法读取null的属性“top”

知道什么可能是错的吗?看起来ScrollSpy导致Bootstrap选项卡找不到对HREF属性的引用.

我正在使用Bootstrap 2.0.2

解决方法

当我在导航中链接到标记中尚不存在的锚点时,我看到了这个错误.例如,如果导航栏中的链接链接到#about,但ID =“about”的页面上不存在任何元素,您将看到此错误.

我们今天的关于带有Spring MVC的Twitter Bootstrapspring for twitter的分享就到这里,谢谢您的阅读,如果想了解更多关于ASP.NET MVC4绑定与Twitter Bootstrap、twitter-bootstrap – angular – 使用PrimeNG和Bootstrap 4、twitter-bootstrap – Bootstrap 3.0.0 – 什么是bootstrap-responsive.css的替代?、twitter-bootstrap – Bootstrap ScrollSpy似乎打破了Bootstrap标签的相关信息,可以在本站进行搜索。

本文标签: