- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个垂直画廊。当您将鼠标悬停在图片上时,它会从左侧滑出 300 像素,然后滑回。
谢谢!
CSS
#gallery{
display:block;
width:400px;
position:absolute;
left: -5px;
}
HTML
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="_js/jquery.easing.1.3.js"></script>
<script>
$(document).ready(function () {
$('.slidingimage').hover(
function () {
$(this).stop().animate({
left: '-5px',
},
500,
'easeInSine'
); // end animate
},
function () {
$(this).stop().animate({
left: '300px',
},
600,
'easeOutBounce'
); // end animate
); // end hover
}); // end ready
</script>
<div id="gallery">
<img class="slidingimage" src="images/gnu.jpg" height="200px" width="250px">
<img class="slidingimage" src="images/tiger.jpg" height="200px" width="250px">
<img class="slidingimage" src="images/black_rhino.jpg" height="200px" width="250px">
<img class="slidingimage" src="images/cape_buffalo.jpg" height="200px" width="250px">
</div>
最佳答案
我想通了。但是,它并不像我想要的那样工作。如果有人对改进功能有建议。那将是真棒。谢谢!
$(document).ready(function() {
$(".slidingimage").hover(function() {
$(this).animate( {"left": "+=300px"}, 2000, "easeInSine" );
});
$(".slidingimage").hover(function() {
$(this).animate( {"left": "-=300px"}, 2000, "easeOutBounce" );
});
});//end of document ready
关于jquery 缓动图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19756100/
我有一个 RelativeLayout,我从 drawable 设置了背景。我能够将 RelativeLayout 的背景更改为另一个RadioButton 被选中。但是当它发生变化时我该如何给它一个
我正在尝试在 Google 的 Play 报亭应用中复制此动画: http://i.imgur.com/UuX1PRO.webm 我的布局看起来像这样: ... more
我一直在评估 Airflow 。我有一个用例,我有一个每小时运行一次的工作流,以获得每小时的数据聚合。另一个每天运行以获得相同的每日聚合。是否可以创建一个组合工作流,其中仅当所有小时聚合在过去一天都成
我有下一个结构: Activity 1: Activity 2: Form to add new item to the recycler View. RecyclerView
我只是想知道 JavaFx 中是否有任何简单的动 Canvas 局方法,例如 VBox 和 HBox。我希望我的应用程序在指定时间后更改 VBox 的背景颜色。但我意识到没有任何类似于 FillTra
我正在使用 Angular 4 动画在按钮上测试一个简单的淡入/淡出动画。我遇到的问题是,因为我使用的是 bool 值,所以没有任何东西被触发。从开发工具来看,它看起来像一个 .ng-animatin
有没有人在 SublimeREPL 中使用 irb 交换 pry 有任何运气?我很接近,我想。我没有收到错误,但是当我输入命令时也没有收到响应。每次我点击返回时,它的行为就像缓冲区被重置一样。 我正在
今天要向小伙伴们介绍的是一个能够快速地把数据制作成可视化、交互页面的 Python 框架:Streamlit,分分钟让你的数据动起来! 犹记得我在做机器学习和数据分析方面的毕设时,
简而言之,我想缩放 View - 就像 Android Market 一样,当您单击“更多”按钮时,例如在“描述”上。 我发现,Android Market 具有以下结构的布局: > 64d
我似乎无法让它工作。 我正在尝试每天发送一个给定的文件,其名称类似于“file_{{ds_nodash}}.csv”。 问题是我似乎无法将此名称添加为文件名,因为它似乎无法使用。在电子邮件的正文或主题
当您调整窗口大小时, float 的 div 将按预期换行到下一行。但我真的很希望这种布局变化是动画化的。 编辑:顺便说一句,找到一个不依赖于 JQuery 的解决方案会很好。如果需要,我不介意编写自
我有一个复杂的数据处理管道,目前在单台机器上用 Python 实现。 管道是围绕处理属于一系列实现文档、页面、单词等的自定义类的对象而构建的。该管道中的大多数操作都是令人尴尬地并行的——它们处理单个文
我是一名优秀的程序员,十分优秀!