zSy*_*sis 1 razor css3pie asp.net-mvc-3
我正在尝试使用css3pie与asp.net mvc一起工作,但由于某种原因它不起作用.
我有一个包含内联css的视图,如下所示:
@{
ViewBag.Title = "Home Page";
}
<div>
<div class="contentWrapper" style="width:600px;margin:25px auto;">
Hello World
<input name="button" value="Button" class="button" type="button" />
</div>
</div>
@section BreadCrumb {
<div class="breadcrumb">
</div>
<div class="pageTitle">
<h1></h1>
</div>
}
@section HeaderContent {
<style type="text/css">
.contentWrapper
{
border: 1px solid #ddd;
padding: 30px 40px 20px 40px;
background: #fff;
/* -- CSS3 - define rounded corners for the form -- */
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
/* -- CSS3 - create a background graident -- */
background: -webkit-gradient(linear, 0% 0%, 0% 40%, from(#EEE), to(#FFFFFF));
background: -moz-linear-gradient(0% 40% 90deg,#FFF, #EEE);
-pie-background: linear-gradient(#FFF, #EEE);
-webkit-box-shadow:0px 0 50px #ccc;
-moz-box-shadow:0px 0 50px #ccc;
box-shadow:0px 0 50px #ccc;
behavior: url(PIE.htc);
}
</style>
}
Run Code Online (Sandbox Code Playgroud)
我已经尝试将PIE.htc文件放在我的项目的根目录,views目录和许多其他地方,但它看起来不像它在IE8及以下版本中工作.htc文件究竟应该去哪里以及如何通过内联css和外部样式表正确引用它?
谢谢
我知道了.使用CSS文件将其添加到Content文件夹,然后对CSS文件中的行为执行以下操作:
behavior: url('../../Content/PIE.htc');
Run Code Online (Sandbox Code Playgroud)
无论如何它对我有用.
| 归档时间: |
|
| 查看次数: |
1582 次 |
| 最近记录: |