【问题标题】:how to use twitter bootstrap with ASP.net Controls?如何在 ASP.net 控件中使用 twitter 引导程序?
【发布时间】:2013-11-08 05:59:03
【问题描述】:

我正在尝试学习如何将 Twitter 引导程序与 ASP.Net 控件(如 DropDown 和 Buttons 以及所有其他 asp 控件)一起使用?

有可能做这样的事情吗?

【问题讨论】:

标签: asp.net twitter-bootstrap controls


【解决方案1】:

阅读 Bootstrap documentation and samples for buttons 以直观地展示开箱即用的 Bootstrap 按钮样式。

在您的页面或母版页中引用bootstrap.css 文件,如下所示:

<link href="bootstrap.css" rel="stylesheet" type="text/css" />

注意:您可以引用人类可读的bootstrap.css 文件或称为bootstrap.min.css 的几乎不可读的缩小版本,部署时请确保使用缩小版本。


然后您可以将 Bootstrap CSS 类名称应用于 ASP.NET Button 控件,如下所示:

<asp:Button id="Button1" 
            runat="server" 
            CssClass="btn btn-primary" 
            Text="Bootstrap Button" />

这个概念也可以应用于其他 ASP.NET 服务器控件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-25
    • 1970-01-01
    • 2013-06-19
    相关资源
    最近更新 更多