当前位置: 首页 > article >正文

css-边框流水线

效果图:
请添加图片描述

代码:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
		<title></title>
		<style type="text/css">
			.card{
				z-index: 1;
				width: 250px;
				height: 250px;
				background-color: aliceblue;
				position: relative;
				overflow: hidden;
			}
			
			.bg{
				z-index: 3;
				width: 240px;
				height: 240px;
				background-color: yellow;
				position: absolute;
				left: 5px;
				top: 5px;
			}
			.blob2{
				z-index: 2;
				width: 250px;
				height: 250px;
				position: absolute;
				left: -50%;
				top: -50%;  
				border-radius: 50%;
				background-color: red;
				transform-origin: right bottom;
				animation: scanning 5s linear infinite;
			}
			.blob{
				z-index: 2;
				width: 250px;
				height: 250px;
				position: absolute;
				left: 50%;
				top: 50%;
				border-radius: 50%;
				background-color: red;
				transform-origin: left top;
				animation: scanning 5s linear infinite;
			}
			@keyframes scanning{
				to{
					transform: rotate(360deg);
				}
			}
		</style>
	</head>
	<body
		style="background-color: black;">
		<div class="card">
			<div class="bg"></div>
			<div class="blob"></div>
			<div class="blob2"></div>
		</div>
	</body>
</html>

效果图

请添加图片描述
代码:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<style>
			*{
				margin: 0;
				padding: 0;
				
			}
			 body{
				 background-color: black;
			 }
			.container{
				width: 100vw;
				height: 100vh;
				backdrop-filter: blur(50px);
				display: flex;
				justify-content: center;
			}
			.box{
				z-index: 1;
				width: 250px;
				box-sizing: border-box;
				height: 250px;
				margin: 50px;
				background-color: red;
				position: relative;
				overflow: hidden;
				-webkit-box-reflect: below 10px linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4));
				
			}
			:root{
				--wi:5px;
				--hi:5px;
			}
			.rect_out{
				z-index: 3;
				position: absolute;
				width: calc(100% - var(--wi));
				height: calc(100% - var(--hi));
				left: calc(var(--wi)/2);
				top: calc(var(--hi)/2);
				background-color: green;
			}
			.rect_in{
				z-index: 2;
				width: 100%;
				height: 100%;
				background-color: yellow;
				position: absolute;
				left: -50%;
				top: -50%;
				border-radius: 50%;
				transform-origin: right bottom;
			    animation: rotate 5s linear infinite;
			}
			@keyframes rotate{
				from{
					transform: rotate(0deg);
				}
				
				to{
					transform: rotate(360deg);
				}
			}
			
		</style>
		
		<div class="container">
			<div class="box">
				<div class="rect_out"></div>
				<div class="rect_in"></div>
			</div>
		</div>
	</body>
</html>

http://www.kler.cn/a/104509.html

相关文章:

  • Spirit:继承 gh-ost 灵魂的 MySQL 在线大表变更方案
  • 图论02-【无权无向】-图的深度优先遍历DFS
  • VUE父组件向子组件传递数据和方法
  • 【嵌入式项目应用】__cJSON在单片机的使用
  • 威联通NAS进阶玩法之使用Docker搭建个人博客教程
  • 算法通过村第十六关-滑动窗口|黄金笔记|结合堆的应用
  • 并发编程面试笔记
  • 私人网盘nextcloud安装
  • 软信天成:助力某制造企业建设产品主数据管理平台案例分享
  • 导入自己的jacoco exec文件到IDEA并进行展示
  • c++构造函数
  • 【2024秋招】2023-9-14 最右线下后端开发二面
  • Vue 2 生命周期与 Vue 3 生命周期:介绍与差别对比
  • GoLong的学习之路(七)语法之slice(切片)
  • 运维 | 使用 Docker 安装 Jenkins | Jenkins
  • Are Large Language Models Really Robust to Word-Level Perturbations?
  • [linux] 怎么批量kill掉挂载运行python 某个.py文件的端口
  • 23款奔驰E300L升级几何多光束大灯 车辆自检等功能
  • Kotlin中的异常处理
  • 【LeetCode刷题日志】189.轮转数组