我在给定以下代码时遇到问题
这是我的样式表
.h_w:hover img{
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
transform: scale(1.1);
-webkit-transition: 5s all;
-moz-transition: 5s all;
-o-transition: 5s all;
-ms-transition: 5s all;
transition: 5s all;
}
.h_w{ border-radius:200px;
-moz-border-radius: 200px;
-ms-border-radius: 200px;
-o-border-radius: 200px;
-webkit-border-radius: 200px;
height: 287px;
overflow: hidden;
position: relative;
width: 287px;
background-color: #FFFFFF;
}
.opacity-0.5{opacity:0.2;}
.circle_background{
background:url(../images/circle-bg.png) no-repeat;
height:100%;
width:100%;
position:absolute;
font-size:15px;
opacity:1 !important;
top: 286px;
}
.h_w:hover .circle_background{
transition:1s all;
-moz-transition:1s all;
-ms-transition:1s all;
-o-transition:1s all;
-webkit-transition:1s all;
top:0px;
z-index:1000px;
}
这是我的 HTML
<body style="background-color: #000000;">
<div class="h_w">
<span><img src="images/projects/circles/background.png" alt="flick the switch" /></span>
</div>
</body>
此代码在 Mozilla firefox 中运行良好,但在 chrome 中,当缩放超出圆圈时它不起作用。
我们将不胜感激。
最佳答案
在这里寻找您的答案:--->X<---
PS:您必须将 -webkit-mask-image: -webkit-radial-gradient(circle, white, black);
添加到您的 img 的 parent-div 样式中。
希望对您有所帮助。
关于html - 跨浏览器 css 过渡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20629179/