Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在服务器上有我的 css 文件,我想包含它们。当我在本地拥有我的 css 文件时,我正在使用
@Assets.CSS("base/images.css")
如何引用服务器上的 css 文件?
<link type="text/css" href="@Url.Content("~/css/base/images.css")" />
评论后:
<link type="text/css" href="http://d34gornfa0.cloudfront.net/images.css" />
或者,创建并使用HTML Helper:
<link type="text/css" href="@Html.ResolveCSSDirectory("image.css")" />