How to stop table from resizing when contents grow?

前端 未结 6 1894
遥遥无期
遥遥无期 2020-12-09 01:53

I have a table, the cells of which are filled with pictures. I would like the pictures to grow larger when you hover over them and I would like the cells of the

6条回答
  •  -上瘾入骨i
    2020-12-09 02:10

    use CSS transitions.

    .zoom {
      padding: 50px;
      background-color: green;
      transition: transform .2s; /* Animation */
      width: 200px;
      height: 200px;
      margin: 0 auto;
    }
    
    .zoom:hover {
      transform: scale(1.5); /* (150% zoom - Note: if the zoom is too large, it will go outside of the viewport) */
    }
    
    
    

    Hover over the div element.

    test text

    w3Schools zoom hover

提交回复
热议问题