【发布时间】:2015-08-09 18:29:11
【问题描述】:
我有一个 ASP.net 网站,其中有以下内容...
HTML:
<div style="width: 99%; margin: 0; padding: 0; text-align: left; overflow: hidden;">
<div id="sample3" lang="is" class="sample3">
<figure>
<img src="../theImages/imgPra.png" width="160" height="160" alt="Specialty Profile" />
<figcaption>Specialty Profile</figcaption>
</figure>
<!--end sample3--></div>
</div>
CSS:
.sample3 figure {
width: 200px;
height: 200px;
overflow: hidden;
position: relative;
background: url('../theImages/preview4.jpg') fixed no-repeat;
}
.sample3 figcaption {
position: absolute;
display: block;
width: 350px;
height: 50px;
left: 110px;
bottom: -110px;
text-align: center;
color: #fff;
background-color: rgba(26,54,59,0.8);
border: 3px solid rgba(62,116,126,0.6);
line-height: 50px;
-moz-box-shadow: rgba(0,0,0,.5) 0 2px 8px;
-webkit-box-shadow: rgba(0,0,0,.5) 0 2px 8px;
box-shadow: rgba(0,0,0,.5) 0 2px 8px;
-moz-transform:rotate(-45deg);
-webkit-transform:rotate(-45deg);
-o-transform:rotate(-45deg);
transform:rotate(-45deg);
-moz-transition: bottom .5s ease-out, left .5s ease-out;
-webkit-transition: bottom .5s ease-out, left .5s ease-out;
-o-transition: bottom .5s ease-out, left .5s ease-out;
transition: bottom .5s ease-out, left .5s ease-out;
}
.sample3 figure:hover figcaption {
left: -20px;
bottom: 20px;
}
JSFiddle:http://jsfiddle.net/vas1watw/
它在普通网页中运行良好,但是当我将它添加到我的 .net 网站时,显示的功能区没有动画。
我该如何解决这个问题。
调试模式:
【问题讨论】:
-
你用什么浏览器测试? CSS 是一种客户端技术,因此服务器技术的相关性较低。
-
IE10... 我运行了标准 HTML 页面,它运行良好:/ 当我检查调试模式时,
class的转换代码不存在。 -
我确定您已经检查过了,但是... CSS 文件是否被缓存?您正在使用的任何选择器或属性是否被页面上的任何其他文件以某种方式覆盖?
-
有趣的是,
sample3类甚至没有在调试模式下显示。