css3 - Y轴旋转导致字体和图片模糊
问题描述
先说下背景,我写了个效果,菜鸟纯瞎写的,两个p 假设AB吧,A显示 B隐藏,点击A后AY轴旋转90deg隐藏紧接着B显示然后旋转90deg,做成了一个p翻转正反面的假象,问题来了, 我点击A的时候,p里面的字体 图片变模糊了,到B出现的时候 B也模糊了,在Firefox上面 效果加载完后 它又自动变回原来的清楚,不模糊了。但是再chrome上 动画结束后还是一直模糊。我想问问怎么解决,不想让它点击出现模糊了,更不想在谷歌上一直模糊 ,html我就不贴了,下面是css js的代码;效果可以上www.maiya.com看一下,求大腿,么么哒~
css代码:
#point{ width: 250px; height: 250px; border: 30px solid #2D5593; left: 593px; top: 122px; left: 532px9; top: 330px9;}#point2{ width: 100%; height: 100%; /*margin: 25px;*/ -webkit-box-shadow: inset 0 0 15px 15px #CCCCCC; -moz-box-shadow: inset 0 0 15px 15px #CCCCCC; box-shadow: inset 0 0 15px 15px #CCCCCC;}#point2f{ width: 100%; height: 100%; -webkit-box-shadow: inset 0 0 15px 15px rgba(0,0,0,0.2); -moz-box-shadow: inset 0 0 15px 15px rgba(0,0,0,0.2); box-shadow: inset 0 0 15px 15px rgba(0,0,0,0.2); display: none; -webkit-transform: rotate3d(1,1,0,90deg); -moz-transform: rotate3d(1,1,0,90deg); -ms-transform: rotate3d(1,1,0,90deg); -o-transform: rotate3d(1,1,0,90deg); transform: rotate3d(1,1,0,90deg);}#point3{ width: 280px; height: 280px; text-align: center;}js代码:$('#point2').click(function () {$(this).css({ ’transition’: ’0.5s’, ’transform’: ’rotate3d(1,1,0,90deg)’,}).fadeOut(500);setTimeout(function () { $('#point2f').css({’transition’: ’0.5s’,’transform’: ’rotate3d(1,1,0,-90deg)’, }).fadeIn(500).css({’transition’: ’0.5s’,’transform’: ’rotate3d(1,1,0,0deg)’, }); }, 500);});$('#point2f').click(function () {$(this).css({ ’transition’: ’0.5s’, ’transform’: ’rotate3d(1,1,0,90deg)’,}).fadeOut(500);setTimeout(function () { $('#point2').css({’transition’: ’0.5s’,’transform’: ’rotate3d(1,1,0,-90deg)’, }).fadeIn(500).css({’transition’: ’0.5s’,’transform’: ’rotate3d(1,1,0,0deg)’, });}, 500);});
问题解答
回答1:css,js代码都贴了,怎么不就不贴html代码。这个问题你可以在要旋转的标签上加上如下属性。
backface-visibility: hidden;transform: translateZ(0)
具体可以参考:Stackflow
相关文章:
1. css - 关于Flex布局的问题2. dockerfile - 为什么docker容器启动不了?3. javascript - sublime快键键问题4. docker gitlab 如何git clone?5. web服务器 - ubuntu下布置apache加wsgi加python6. css3 - 背景图自定义比例缩小7. docker 17.03 怎么配置 registry mirror ?8. 关docker hub上有些镜像的tag被标记““This image has vulnerabilities””9. docker - 如何修改运行中容器的配置10. css - 图片的宽度发生变化而高度却没有相应变?

网公网安备