图片是放在easyui datagrid列里面的,我写的是当鼠标经过图片放大离开变回原形
代码是这样的:
鼠标经过
a:hover img[class=imgView]{
position:absolute;
-webkit-transform: scale(5);
-ms-transform: scale(5);
transform: scale(5);
transition: all 1s ease 0s;
-webkit-transform: scale(5);
-ms-transform: scale(5);
transform: scale(5);
-webkit-transform: all 1s ease 0s;
-ms-transform: all 1s ease 0s;
transform: all 1s ease 0s;
z-index:10;
}
.imgView{
height:40px;
width:53px;
padding:2px;
}
在谷歌浏览器里面,鼠标经过时有时会一直闪有时又显示正常,大家知道是怎么回事吗
回复讨论(解决方案)
我最近也遇到过这个问题,我是通过改变文档结果来解决的。但这个问题的原理和出现的原因我不是太明白,我给你说下我的总结吧:
1.在css里面把过度效果删除,就不会出现闪烁的状况;
2.一个页面有多个这种过度效果,第一个过度效果没问题,后面的过度效果都会出现闪烁效果;
3.F12检查在过度的时候,闪烁的那个元素css样式并没有改变。
(ps:这是我出现的问题)
所以根据上面的情况我就觉得是文档结构出问题了,闪烁的元素可能被覆盖了,所以我就改了文档结构。
感觉你的问题和我挺像的,这个挺麻烦的,好好检查一下吧。
f12怎么检查过度效果啊,是这样改吗
a:hover img[class=imgView]{
position:absolute;
transform: scale(5);
transition: all 1s ease 0s;
z-index:10;
}
还是会闪动啊
你这样改只是把过度的兼容性语句去掉,根本看不出上面变化。transform: scale(5); transition: all 1s ease 0s;这两句才是你的过度效果。我的意思是删除这个来检查,但矛盾的是你删除这个你的图片也不会有什么变化,所以也检查不了什么。
我的意思是你根据我的思路去想一想调试方法,或者是说改变一下你的方法。
你可以试一试直接改变图片高和宽来做,不要用 transform: scale(5);
可以改用js动画来实现。。。
你这样改只是把过度的兼容性语句去掉,根本看不出上面变化。transform: scale(5); transition: all 1s ease 0s;这两句才是你的过度效果。我的意思是删除这个来检查,但矛盾的是你删除这个你的图片也不会有什么变化,所以也检查不了什么。
我的意思是你根据我的思路去想一想调试方法,或者是说改变一下你的方法。
你可以试一试直接改变图片高和宽来做,不要用 transform: scale(5);
我直接设置了宽高还是不行,鼠标放在图片边缘就会一直闪
可以改用js动画来实现。。。
什么意思啊?在js里面设置css吗?效果一样的啊
可以改用js动画来实现。。。
谢谢,animate函数可以实现。
可以用JQuery来实现啊
transition: all 1s ease 0s;应该写在a后而非 :hover事件之后 。 }
js设置一个延时展示或者延时隐藏比较好,另外easy ui 的datagrid不太适合这个...
很简单的写法如
img{overflow:hidden;transition:all 5s;}
img:hover{transform:scale(1.2)}
鼠标放上去图片就会慢慢变大,效果不错
transition: all 1s ease 0s;应该写在a后而非 :hover事件之后 。 }
这样图片是不闪了,但是图片就不会慢慢放大了啊
js设置一个延时展示或者延时隐藏比较好,另外easy ui 的datagrid不太适合这个...
之前用jquery animate函数鼠标在多张图片之间来回晃几下,动画就停不下来了
很简单的写法如
img{overflow:hidden;transition:all 5s;}
img:hover{transform:scale(1.2)}
鼠标放上去图片就会慢慢变大,效果不错
360兼容模式下就成这样了
还有ie9以下是不支持其它元素伪类的
js设置一个延时展示或者延时隐藏比较好,另外easy ui 的datagrid不太适合这个...
之前用jquery animate函数鼠标在多张图片之间来回晃几下,动画就停不下来了
这么炫的效果,确实有点难度。。。。。。
http://www.kendoui.io/examples/grid/index.html
这个比较炫,你看下。、
js设置一个延时展示或者延时隐藏比较好,另外easy ui 的datagrid不太适合这个...
之前用jquery animate函数鼠标在多张图片之间来回晃几下,动画就停不下来了
这么炫的效果,确实有点难度。。。。。。
http://www.kendoui.io/examples/grid/index.html
这个比较炫,你看下。、
嗯嗯,谢谢。
我把transition:all 1s ease 0s写在img后面,基本上就可以正常使用了。
js设置一个延时展示或者延时隐藏比较好,另外easy ui 的datagrid不太适合这个...
之前用jquery animate函数鼠标在多张图片之间来回晃几下,动画就停不下来了
这么炫的效果,确实有点难度。。。。。。
http://www.kendoui.io/examples/grid/index.html
这个比较炫,你看下。、
嗯嗯,谢谢。
我把transition:all 1s ease 0s写在img后面,基本上就可以正常使用了。
js设置一个延时展示或者延时隐藏比较好,另外easy ui 的datagrid不太适合这个...
之前用jquery animate函数鼠标在多张图片之间来回晃几下,动画就停不下来了
这么炫的效果,确实有点难度。。。。。。
http://www.kendoui.io/examples/grid/index.html
这个比较炫,你看下。、
嗯嗯,谢谢。
我把transition:all 1s ease 0s写在img后面,基本上就可以正常使用了。

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

The role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.

HTMLisaspecifictypeofcodefocusedonstructuringwebcontent,while"code"broadlyincludeslanguageslikeJavaScriptandPythonforfunctionality.1)HTMLdefineswebpagestructureusingtags.2)"Code"encompassesawiderrangeoflanguagesforlogicandinteract

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version
Useful JavaScript development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment