我想放大悬停的圆形元素以显示更多的背景。展开圆盘保持背景居中?
我以为我设法做到这一点,不过背景的过渡过程中轻微移动,这是我现在有:
.foto-icono // The container
{
height: 250px;
text-align: center;
}
.foto-icono > div // The image without padding
{
border-radius: 50%;
width: 200px;
height: 200px;
padding: 0;
transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-webkit-transition: all 0.3s ease;
}
.foto-icono > div:hover // More padding and a negative margin so it stays on the same position
{
padding: 20px;
margin-top: -20px;
}
我也试着改变悬停该项目的高度和宽度(而不是填充),但我随机从背景中得到一个奇怪的“颤抖”。
我该怎么做?
用Firefox,它工作得很好 - 铬虽然捣毁。 – drahnr
尽管如此,如果您将小提琴的大小调整为足以强制垂直滚动条,它的工作原理应该如何。 – George
对我来说,它在Chrome中运行正常(没有滚动条)。 – j08691