- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我一直在努力保持当用户在其上绘制鼠标时动画仍然在场景中的 div。
HTML
<table>
<tr>
<td id="portrait">
<div id="photo"></div>
</td>
<td id="slide">
<div id="slider">
<a id="something" class="thisthing">some link here</a>
</div>
</td>
</tr>
</table>
CSS
#portrait{
width:120px;
height:100px;
top:20px;
border: solid black 1px;
margin: 0px;
padding: 0px;
}
#slide{
height:100px;
border: none;
padding-left:30px;
}
#slider{
border: none;
padding-left:30px;
background-color:green;
position:relative;
height:100%;
opacity:0;
width:0px;
overflow:hidden;
}
.thisthing{
cursor:pointer;
font-size: 15px;
text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
color: green;
white-space: nowrap;
}
#something{
position:relative;
left: -25px;
}
JS
$('#portrait').mouseover(function(){
$('#slider').animate({
opacity: 1,
width: "300px"
}, 1500, $.noop);
});
$('#slider').mouseout(function(){
$('#slider').animate({
opacity: 0,
width: "0px"
}, 1000, $.noop);
});
我的解决方案根本无法正常工作,褪色严重且滞后很多,因为一旦用户离开黑色方 block ,div 就会立即消失。我想要的是将黑色方 block 悬停,出现绿色div然后仅当div消失 $(/* .mouseout() 黑色方 block 或绿色 div*/).fadeOut(thegreendiv)
.
AKA 当您将链接悬停在“此处的某个链接”或绿色 div 的任何其他部分时,我希望它保留在那里,否则会淡出。
最佳答案
使用方法 mouseenter
和 mouseleave
而不是 over
和 out
并且有更大的 mouseleave 区域
HTML
<table id="hoverOutZone">
<tr>
<td id="portrait">
<div id="photo"></div>
</td>
<td id="slide">
<div id="slider">
<a id="something" class="thisthing">some link here</a>
</div>
</td>
</tr>
</table>
新 JS
$('#portrait').mouseenter(function () {
$('#slider').animate({
opacity: 1,
width: "300px"
}, 1500);
});
$('#hoverOutZone').mouseleave(function () {
$('#slider').animate({
opacity: 0,
width: "0px"
}, 1000);
});
关于javascript - 在场景中维护一个动画 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20642833/
我们已经在我的工作场所使用 SVN 几年了,自从我们安装它以来,除了更新和备份之外,我们真的没有对其进行任何类型的维护。我们还应该做些什么来维护 SVN,或者我们已经做了所有我们真正需要做的事情吗?
正则表达式模式如下: ".*/.*/.*/.*/.*/.*/(.*)-\d{2}\.\d{2}\.\d{2}.\d{4}.*" 确实很难维护。 我想知道,有没有这样的东西: ".*/.*/.*/.*/
我已经搜索了一些,但没有找到任何对我有帮助的问题/答案。问题是我的 jQuery 函数调用变得太大而无法维护。我想知道我是否应该进行更多重构,或者是否有更好的方法来完成所有这些调用。当我进行一次调用时
我在 mySql 中有一个记录表。我需要按照用户指定的方式为它们维护订单。所以我添加了一个“位置”列。 当我移动特定记录时更新所有记录的 SQL 语句是什么?我有类似的东西: UPDATE items
我正在使用 go channels 作为类似队列的机制,这非常适合我。我正在为每个用户打开这些类似队列的 channel 之一,并为这些 channel 中的每一个都有一个 for-range 循环。
使用 docker,您可以非常好地基于其他图像创建图像。例如,您可以制作一个镜像 Java-jdk7(基于最新的 Ubuntu LTS),并在此基础上创建镜像 elastic-search 和 tom
我正在用 Bash 编写脚本。 我的关联数组有问题,当我像这样在我的数组中放置一条记录时: declare -A arr_list_people_name 我将文本放入循环关联数组的方式(将文本排序)
我目前正在开发一个系统,该系统需要在没有可用互联网连接的情况下安装 python(或者至少我不能假设有可用的互联网连接), 我想知道维护 PIP 存储库的间接费用是多少,而且这样的存储库也可能会满足系
我正在考虑使用 Chrome 扩展的国际化支持,如 here 所述. 建议的翻译方法是先创建英文 messages.json 文件,然后将其复制并翻译成给定的语言。 我的问题是,这对于初始翻译来说工作
我想在(自托管)bitbucket 服务器中克隆 github 存储库,并不时从 github 存储库中提取最新更改。在我们的克隆中,我们将做一些永远不会离开我们的存储库的实验性内容。 为了显示;对于
我的应用程序基于银行域,需要 session 处理。当应用程序空闲时(应用程序打开后没有任何触摸事件)必须在后台计算时间。 当应用程序进入前台时,我处理 session 维护以及 AppDelegat
我可以保持 UISegmentViewControl 段的选定状态吗?即,即使用户选择了另一个段,也可以保持一个段显示为选中状态?我似乎在任何地方都找不到任何可以做到这一点的东西!! 最佳答案 这是不
我的要求:我想将登录详细信息(电子邮件、密码)发送到服务器,必须保持有效用户名的 session 。 如何使用 iphone SDK 的“NSURLConnection”创建和维护 session ?
就像Carl's question over here我想问你(因为我自己找不到 :( ) 删除既不是静态也不是动态(例如通过反射)使用的程序集引用是否有任何好处。 最佳答案 除了清理项目之外,删除未
我使用的是Bootstrap 3。我目前有2个页面,一个是查看页面,一个是编辑页面。两个页面都有许多导航选项卡,例如 id= tab1、tab2、tab3。 我想要实现的是,当我在查看页面的 tab2
我正在创建 Chrome 应用程序,我希望我的用户在首次进入应用程序时登录或创建用户。 目标: 在 Chrome 打包的应用程序上维护登录状态。 问题: Cookie - Chrome 打包的应用程序
我有arm模板来使用资源及其设置重新创建资源组。这工作得很好。 用例: 一些开发人员访问 Azure 门户并更新某些资源的某些设置。有没有办法获得可以应用于我的模板的精确更改以使这些更改生效? (更新
我有一个包含三个组合框的表单,一个代表该月(可能的)31 天,第二个代表代表月份的 12 个数字,第三个代表与 future 五年相对应的年份值。 我将它们连接在一起形成一个日期 TheDay = C
我有一个打开多个 JIF 的应用程序,但我只想创建 JIF 的单个实例,因此我使用这些函数来检查这一点,并在按下某个键后使用 dispose 关闭 JIF(JDesktopPane. getSelec
我想为一个项目制作一个帐户屏幕,但我对 GUI 还很陌生。这是我第一次使用 JComboBox,但遇到了一些麻烦。我基本上想将 JComboBox 放置在一个盒子内,这将成为我的背景图像的一部分。我尝
我是一名优秀的程序员,十分优秀!