簡體   English   中英

如何將 CSS 添加到 HTML 助手 ASP.NET MVC

[英]How to add CSS to HTML helpers ASP.NET MVC

我有一個這樣的 HTML 幫手:

<p>@Html.EditorFor(model => model.NameUser)</p>

這是代碼運行時:

在此處輸入圖像描述

我如何向它申請 CSS class? 就像我希望輸入背景是藍色或邊框半徑 15px

there are three ways for adding css in html 1.) inline CSS eg: 2.) internal CSS eg: under this tag you can use CSS properties 3.) external CSS - create a new file with.CSS extension and then link html and CSS 文件使用 LINKREL 屬性。``

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM