CSS鼠标划过图片,图片变大背景文字变色代码
.hover-image { width: 100%; /* 默认情况下,图片填充容器宽度 */ transition: transform 0.6s ease; /* 平滑变化 */ } .hover-image:hover { transform: scale(1.2); /* 鼠标悬停时,图片缩放1.1倍 */ } .pro_img_cover:hover{ border-radius:8px; background:#d84a38;/* 背景色 */ box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);/* 边框加阴影 */ }
<div class="pro_img_cover"> <a href="[list:link]"><img class="hover-image" src="[list:ico]" alt="[list:title]"> <p class="text-center">[list:title]</p></a> </div>
Statement: If the content on this site infringes upon the legitimate rights and interests of the original author, please contact this site to delete it.