用css写圆形镂空打孔效果的优惠券
Admin 2021-04-25 群英技术资讯 1759 次浏览
我们在开发电子商务网站时,往往会遇到发开商场优惠券的需求,那么我们就需要考虑优惠券的样式。边缘镂空打孔效果,是我们经常能在一些优惠券的设计上能看到的,下面是就给大家分享一下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>

<!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>
效果如下

<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圆形镂空的代码介绍。css圆形镂空除了能够用作优惠劵样式,还能做邮票,打孔纸张效果样式等等,大家能够发挥自己的想象。对css圆形镂空就介绍到这,希望对大家学习有帮助。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:mmqy2019@163.com进行举报,并提供相关证据,查实之后,将立刻删除涉嫌侵权内容。
猜你喜欢
用CSS如何让图片自适应容器?我们在做网页的时候,图片的使用的很频繁的,有一些场景需要让图片自适应容器的大小,那么要怎样做呢?本文给大家分享两种方法,感兴趣的朋友可以参考。
这篇文章主要介绍了用HTML5做的导航条详细步骤,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下
CSS3如何实现列表无限滚动/轮播效果?一些朋友可能会遇到这方面的问题,对此在下文小编向大家来讲解一下,内容详细,易于理解,希望大家阅读完这篇能有收获哦,有需要的朋友就往下看吧!
这篇文章主要介绍了通过CSS边框实现三角形和箭头的实例代码,非常不错,具有一定的参考借鉴价值,需要的朋友可以参考下
在开发中,很多需求需要我们对元素居中,例如文本居中,多行文本居中,块级元素水平居中、垂直居中等,那么这些要如何实现呢?下面是一些css实现元素居中的方法,有需要的朋友可以参考一下。
成为群英会员,开启智能安全云计算之旅
立即注册关注或联系群英网络
7x24小时售前:400-678-4567
7x24小时售后:0668-2555666
24小时QQ客服
群英微信公众号
CNNIC域名投诉举报处理平台
服务电话:010-58813000
服务邮箱:service@cnnic.cn
投诉与建议:0668-2555555
Copyright © QY Network Company Ltd. All Rights Reserved. 2003-2020 群英 版权所有
增值电信经营许可证 : B1.B2-20140078 ICP核准(ICP备案)粤ICP备09006778号 域名注册商资质 粤 D3.1-20240008