To create a navigation bar for an MVC application

Source: Internet
Author: User

What do you write tonight?
As for the previous exercise, it seems to look like a menu navigation bar. In the practice site, there are three controllers created, and we'll use them to create a navigation bar. To implement this navigation bar, it is still a bit difficult at first, or think of the previous ASP. So you can use div+ ul + Li to do this, but you have to write CSS style to see the effect.

Create a style menunavigationbar.css under the content directory under the application:



Then, open the Views/shared/_layout.cshtml Add menu navigation bar:



Add and modify highlighted parts of the code.
OK, take a look at the real-time operation effect:



After reading the above implementation of the process and the final real-time operation demo, super simple menu navigation bar, or easy and simple.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.