设为首页 - 加入收藏 ASP站长网(Aspzz.Cn)- 科技、建站、经验、云计算、5G、大数据,站长网!
热搜: 创业者 手机 数据
当前位置: 首页 > 综合聚焦 > 编程要点 > 正文

用css写圆形镂空打孔效果的优惠券

发布时间:2022-02-21 14:34 所属栏目:13 来源:互联网
导读:我们在开发电子商务网站时,往往会遇到发开商场优惠券的需求,那么我们就需要考虑优惠券的样式。边缘镂空打孔效果,是我们经常能在一些优惠券的设计上能看到的,下面是就给大家分享一下css圆形镂空效果的实现。大家在做优惠券时,能参考一下。 .hollow-compo
      我们在开发电子商务网站时,往往会遇到发开商场优惠券的需求,那么我们就需要考虑优惠券的样式。边缘镂空打孔效果,是我们经常能在一些优惠券的设计上能看到的,下面是就给大家分享一下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圆形镂空就介绍到这,希望对大家学习有帮助。

(编辑:ASP站长网)

    网友评论
    推荐文章
      热点阅读