首页 > 解决方案 > 在悬停弹性盒上显示另一个图像

问题描述

所以当我将鼠标悬停在其中一个上时,我试图让我的图像发生变化。我正在尝试为这三张图片执行此操作,但我无法执行此操作。我知道我需要使用 :hover psuedo,但我不确定应该如何进行。

#three { 
  background-color: #035177;
  padding: .5vw;
  display: -ms-flexbox;
  -ms-flex-wrap: wrap;
  -ms-flex-direction: column;
  -webkit-flex-flow: row wrap; 
  flex-flow: row wrap; 
  display: -webkit-box;
  display: flex;
}
#three div { 
  -webkit-box-flex: auto;
  -ms-flex: auto;
  flex: auto; 
  width: 200px; 
  margin: .5vw; 
}
#three div img { 
  width: 100%; 
  height: auto; 
}
       <div id="three">
            <div id="picutureOne">
                <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/jeremiah-wilson-1.jpg" alt>
                
            </div>
            
            <div id="pictureTwo">
                <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/jeremiah-wilson-2.jpg" alt>
            
            </div>
            
            <div id="pictureThree">
                <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/jeremiah-wilson-3.jpg" alt>
            
            </div>
        </div>

标签: htmlcssflexbox

解决方案


推荐阅读