Implementation of CSS circular hollowing (coupon background image)

Implementation of CSS circular hollowing (coupon background image)

This article mainly introduces CSS circular hollowing (commonly used as coupon background images) and shares it with you. The details are as follows:

.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>

Rendering

<!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>

The effect is as follows

insert image description here

<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>

The effect is as follows

This is the end of this article about CSS circular hollowing (commonly used as coupon background images). For more relevant CSS circular hollowing content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

<<:  How to use custom images in Html to display checkboxes

>>:  Summary of techniques for implementing complex page layout using frameset

Recommend

How to maintain MySQL indexes and data tables

Table of contents Find and fix table conflicts Up...

npm Taobao mirror modification explanation

1. Top-level usage 1. Install cnpm npm i -g cnpm ...

Detailed example of sorting function field() in MySQL

Preface In our daily development process, sorting...

Understand the principles and applications of JSONP in one article

Table of contents What is JSONP JSONP Principle J...

How to pass the value of the select drop-down box to the id to implement the code

The complete code is as follows : HTML code: Copy ...

A brief discussion on Vue3 father-son value transfer

Table of contents From father to son: 1. In the s...

JS realizes the effect of Baidu News navigation bar

This article shares the specific code of JS to ac...

Vue3 based on script setup syntax $refs usage

Table of contents 1. Vue2 syntax 2. Use of Vue3 1...

Solution for Tomcat to place configuration files externally

question When we are developing normally, if we w...

Detailed explanation of this pointing problem in JavaScript function

this keyword Which object calls the function, and...

Two ways to start Linux boot service

Table of contents rc.local method chkconfig metho...

MySQL database basic syntax and operation

MySQL database basic syntax DDL Operations Create...

Basic operations of mysql learning notes table

Create Table create table table name create table...

How to use gdb to debug core files in Linux

1.core file When a Segmentation fault (core dumpe...

Introduction to Linux common hard disk management commands

Table of contents 1. df command 2. du command 3. ...