白色边框透明加动画

29 篇文章 1 订阅

效果图:



代码如下:

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<style>
		.imgdiv{
			position: relative;
			width: 280px;
			height: 279px;
			overflow: hidden;
			box-shadow: 5px 5px 10px #434343;
			/* transform: rotate(5deg); */
		}
		img:hover{
			border:none;
			transform: scale(1.1, 1.1);
			-webkit-transform: scale(1.1, 1.1);
			-moz-transform: scale(1.1, 1.1);
			-o-transform: scale(1.1, 1.1);
			-ms-transform: scale(1.1, 1.1);
			transition: all linear .5s;
			-moz-transition: all linear .5s; /* Firefox 4 */
			-webkit-transition: all linear .5s; /* Safari 和 Chrome */
			-o-transition:all linear .5s;
			
		}
		.layer{
			position: absolute;
			left: 0;
			bottom: 0;
			right: 0;
			top: 0;
			margin: auto;
			width: 200px;
			height: 200px;
			background: rgba(255,255,255,0.5);
			filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4c000000,endColorstr=#4c000000);
		}
		.box{
			position: absolute;
			left: 0;
			bottom: 0;
			right: 0;
			top: 0;
			margin: auto;
			width: 180px;
			height: 180px;
			background-color: #fff;
			background-clip: padding-box;
		}
		.top{
			width: 150px;
			height: 70px;
			border-bottom: 3px solid #BEA971;
			margin-left: 10px;
			margin-top: 10px;
			text-align: center;


		}
		.bottom{
			width: 150px;
			height: 70px;
			margin-left: 10px;
			margin-top: 10px;
			text-align: center;
		}
		
	</style>
	<link rel="stylesheet" href="">
</head>
<body>
	<div class="imgdiv">
		<img src="1.jpg" alt="">
		<div class="layer">
			<div class="box">
				<div class="top">
				<b>bold</b>
				<p>this is a pictrue</p>
				</div>
				<div class="bottom">
				<b>bold</b>
				<p>this is a pictrue</p>
				</div>
			</div>
		</div>
	</div>
</body>
</html>

















  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值