p { display:inline-block; border:solid 1px #666; margin:100px auto; overflow:hidden; /*隐藏超过边界的*/ } /*图片过渡变化*/ p img { transition:all 0.5s; cursor:pointer; } /*鼠标移到图片放大1.2倍*/ p img:hover { transform:scale(1.2); }