Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CSS3图像在带过渡的悬停状态下超出圆形div_Css_Transition - Fatal编程技术网

CSS3图像在带过渡的悬停状态下超出圆形div

CSS3图像在带过渡的悬停状态下超出圆形div,css,transition,Css,Transition,为什么图像在overflow:hiddendiv onhover,如何修复此错误 例: 注意:chrome有问题 通过在img中添加边界半径来解决此问题。我不确定这是不是你想要的。请评论这件事与否 a { width: 100px; height: 100px; background: #000; display: block; border: 2px solid #000; border-radius: 50%; overflow: hi

为什么图像在
overflow:hidden
div onhover,如何修复此错误

例:

注意:chrome有问题


通过在img中添加边界半径来解决此问题。我不确定这是不是你想要的。请评论这件事与否

a {
    width: 100px;
    height: 100px;
    background: #000;
    display: block;
    border: 2px solid #000;
    border-radius: 50%;
    overflow: hidden;
}
img {
    max-width: 100%;
   -webkit-transition: opacity 0.1s linear;
    -moz-transition: opacity 0.1s linear;
    -o-transition: opacity 0.1s linear;
    transition: opacity 0.1s linear;
    border-radius: 50%;
}
img:hover {
    opacity: 0.5;
}