Asp.net MVC 引用bootstrap排版 (六)

說明

這篇是引用 bootstrap 做排版,更換按鈕的顏色。

操作流程

安裝bootstrap 套件

在 index 上用 bootstrap 做編排

  • index.cshtml
@{
    Layout = null;
}

<!--DOCTYPE html-->




    <meta name="viewport" content="width=device-width">

    <link href="~/Content/bootstrap.css" rel="stylesheet">
    <link href="~/Content/bootstrap-theme.css" rel="stylesheet">
    <title>Index</title>
    <style>
        .btn a {color :white; text-decoration: none}
        body{background-color : white;}

    </style>




    <div class="text-center">
        @ViewBag.Greeting  World(from this view)


        <h2> We are going to have an exciting party <br></h2>
        <h3>And u r invited</h3>
        <div class="btn btn-success">

            @Html.ActionLink("RSVP Now", "RsvpForm")

        </div>
</div>

Demo

留言