网页制作 
首页 > 网页制作 > 浏览文章

css圆形镂空(优惠券背景图)的实现

(编辑:jimmy 日期: 2024/11/28 浏览:3 次 )

本文主要介绍了css圆形镂空(常用做优惠券背景图),分享给大家,具体如下:

.hollow-compose-three-circles {
  width: 300px;
  height: 100px;
  position: relative;
  background: radial-gradient(circle at right top, transparent 10px, #00adb5 0) top left / 60px 51% no-repeat,
    radial-gradient(circle at right bottom, transparent 10px, #00adb5 0) bottom left /60px 51% no-repeat,
    radial-gradient(circle at left top, transparent 10px, #eeeeee 0) 60px 0/230px 51% no-repeat,
    radial-gradient(circle at left bottom, transparent 10px, #eeeeee 0) 60px 50px /230px 51% no-repeat,
    radial-gradient(circle at 10px 50px, transparent 10px, #eeeeee 0) 290px 0/10px 100px no-repeat;
   filter: drop-shadow(2px 2px 2px rgba(0,0,0,.2));
}

.hollow-compose-three-circles::after {
  content: '';
  height: 80px;
  border: 1px dashed #fff;
  position: absolute;
  left: 60px;
  top: 0;
  bottom: 0;
  margin: auto;
}
<div  class="hollow-compose-three-circles"></div>

css圆形镂空(优惠券背景图)的实现
 

<!doctype html>
<head>
<meta charset="UTF-8">
<title>process</title>
<style>
	body{
		background: gray;
	}
   .many-circles {
      margin: 10px 0 0 40px;
	    width: 200px;
	    height: 100px;
	   background: radial-gradient(circle at right, transparent 10px, #00adb5 0) top right / 51% 60px no-repeat,
	    radial-gradient(circle at left, transparent 10px, #00adb5 0) top left / 51% 60px no-repeat;
	    /*radial-gradient(circle at  top right, transparent 10px, #eeeeee 0) bottom right / 51% 40px no-repeat,
	    radial-gradient(circle at left top, transparent 10px, #eeeeee 0) bottom left / 51% 40px no-repeat;*/
	   filter: drop-shadow(2px 2px 2px rgba(0,0,0,.2));
}

</style>
</head>
<body>
	
 <div data-v-85036100="" class="many-circles"></div>
<script>
</script>
</body>
</html>

效果如下

css圆形镂空(优惠券背景图)的实现

<style>
	body{
		background: gray;
	}
	
   .hollow-one-circle{
		display: inline-block;
	  width: 246px;
	  height: 218px;
	  position: relative;
	  background: radial-gradient(circle at 0 106px, transparent 10px, #FF4654 0) top left/246px 100% no-repeat;  
	}
	.hollow-one-right{
		display: inline-block;
		width: 718px;
		  height: 218px;
		  position: relative;
		background: radial-gradient(circle at 718px 106px, transparent 10px, #ffffff 0) top left/718px 100% no-repeat;
		
box-shadow:3px 0px 13px 0px rgba(0,0,0,0.03);
	}

.hollow-one-circle::before {
  content: '';
  position: absolute;
  height: 100%;
  width:5px;
  top: 4px;
  left: 246px;
  background-image: linear-gradient(to bottom, #FF4654 5px, transparent 5px, transparent),
  radial-gradient(10px circle at 5px 10px, transparent 5px, #FF4654 5px);
  background-size: 5px 15px;
}
.hollow-one-circle:after {
  
}
</style>
<div data-v-85036100="" class="hollow-one-circle"></div>
<div data-v-85036100="" class="hollow-one-right"></div>

css圆形镂空(优惠券背景图)的实现

上一篇:详解利用css3的var()实现运行时改变scss的变量值
下一篇:纯CSS实现页面中的列表收拉效果
一句话新闻
高通与谷歌联手!首款骁龙PC优化Chrome浏览器发布
高通和谷歌日前宣布,推出首次面向搭载骁龙的Windows PC的优化版Chrome浏览器。
在对骁龙X Elite参考设计的初步测试中,全新的Chrome浏览器在Speedometer 2.1基准测试中实现了显著的性能提升。
预计在2024年年中之前,搭载骁龙X Elite计算平台的PC将面世。该浏览器的提前问世,有助于骁龙PC问世就获得满血表现。
谷歌高级副总裁Hiroshi Lockheimer表示,此次与高通的合作将有助于确保Chrome用户在当前ARM兼容的PC上获得最佳的浏览体验。
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 网站地图 SiteMap