vs2013 ASP.NET Web Form + Bootstrap 套件

2025-10-20 05:54:51

1、File->

New->

Project…

vs2013 ASP.NET Web Form + Bootstrap 套件

2、▲web

       Visual Studio 2012->

ASP.NET Empty Web Application->

ok

(PS:可以自己改名字,也可以browse自己改放在其他地方)

vs2013 ASP.NET Web Form + Bootstrap 套件

3、TOOLS->

NuGet Package Manager ->

Manage NuGet Packages for Solution…

vs2013 ASP.NET Web Form + Bootstrap 套件

4、右上角 键盘输入bootstrap->

按那个搜索

获得  Bootstrap CSS  ,点击Install

载入完毕会有对话框

然后确定要载到刚刚那个创建好的的web名下的即可

vs2013 ASP.NET Web Form + Bootstrap 套件

5、成果(如果没有这个Solution Explorer,那么点击VIEW->Solution Explorer 就会出现了,话说我这里的成果和参考资料的文件分层有些许不同,但重点一样啦)

vs2013 ASP.NET Web Form + Bootstrap 套件

1、后面两者引号里面的就是用的bootstrap里面的css定义的颜色、字体等的值名class=“”name=“”

代码

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication2.WebForm1" %>

<!DOCTYPE html> 

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <meta http-equiv="content-type" content="text/html;charset=utf-8"/> 

    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

    <meta name="keywords" content=""/>

    <link rel="stylesheet" href="/Content/bootstrap-theme.css"/>

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

    <title>招聘</title>

</head>

<body>

    <form id="form1" runat="server">

    <div class="navbar-inverse">

       <div class="well-lg"> 

           <h3 >泉州</h3> 

       </div>

           <ul class="navbar-nav"> 

           </ul> 

        <span></span> 

    </div> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->

     <script src="/Scripts/jquery-1.9.1.js"></script>

    <!-- Include all compiled plugins (below), or include individual files as needed -->

   <script src="/Scripts/bootstrap.js"></script>

    </form>

</body>

</html>

vs2013 ASP.NET Web Form + Bootstrap 套件

2、附带举例另一种路径

 <link rel="stylesheet" type="text/css" 

href="bootstrap-3.3.5-dist/css/bootstrap-theme.css"/>

    <link rel="stylesheet" type="text/css"

href="bootstrap-3.3.5-dist/css/bootstrap.css"/> 

vs2013 ASP.NET Web Form + Bootstrap 套件

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢