Html
    Css
    Js

    
                        
 .cda::before {
	width:100px;
	position:absolute;
	top:30px;
	right:30px;
	bottom:30px;
	left:30px;
	content:'';
	opacity:0;
	z-index:1;
	border-top:1px solid #fff;
	border-bottom:1px solid #fff;
	transform:translate(50%,0);
	transition:all 0.5s linear;
}
.cda::after {
	height:100px;
	position:absolute;
	top:30px;
	right:30px;
	bottom:30px;
	left:30px;
	content:'';
	opacity:0;
	z-index:1;
	border-left:1px solid #fff;
	border-right:1px solid #fff;
	transition:all 0.5s linear;
	transform:translate(0,50%);
}
.cda-img {
	transition:all 0.2s linear;
}
.cda:hover .cda-img {
	transform:scale(1.2);
}
.cda:hover .cdd {
	opacity:1 !important;
}
.cda:hover::before {
	width:calc(100% - 60px);
	opacity:1 !important;
	/* transform:scale(1);
	*/
            transform:scale(1)   !important;
}
.cda:hover::after {
	height:calc(100% - 60px);
	opacity:1 !important;
	transform:scale(1)  !important;
}
.cda:hover .cdd-p {
	opacity:1 !important;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

css鼠标移入动态效果

更新时间:2023-11-13 08:06:32

鼠标移入元素,图片放大,开启遮罩层,文本显示出来,伪元素线条中间往两边延伸

0