html - 跨浏览器 css 过渡

标签 html css

我在给定以下代码时遇到问题

这是我的样式表

.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/

相关文章:

javascript - 如何将 Controller 函数计​​算出的值作为参数传递给 HTML 指令?

html - CSS Trick 的响应式数据表(具有内联编辑模式)显示问题

html - 在多个 html 页面中调用单个 css 菜单

javascript - 谷歌浏览器的 JQuery FullCalendar CSS 错误

css - 编辑 Bootstrap them SASS 作为新手

css - 样式并不总是适用于嵌套表格

ios - iPhone 呈现与桌面浏览器不同的 HTML 表单

html - 带有静止标题的表格

Javascript 表单验证不起作用

javascript - 使用 DOM 操作一次将鼠标悬停在一个元素上