CSS3简单画出3d图形
2024-08-27 01:48:27
1、气球
2、泳圈
1、2两图实现代码分别如下:
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>气球特效</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="" rel="stylesheet">
<style type="text/css">
*{margin:0;padding: 0;}
body{position: relative; overflow: hidden; background: #ccc;}
.balloon{
display: inline-block;
position: absolute;
width: 160px;
height: 160px;
background: #faf9f9;
border-radius: 160px 160px 64px 160px;
transform:rotate(45deg);
/* 盒子阴影 纵向移动 横向移动 羽化 半径 颜色 内外切换*/
box-shadow:8px 8px 80px 8px #873940 inset;
}
.balloon::after{
position: absolute;
bottom: 0;
right: 0;
content:'';
width: 0;
height: 0;
border:8px solid transparent;
border-right-color:#873940;
transform: rotate(45deg);
border-radius: 16px; }
</style>
</head>
<body>
<div class="balloon"></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>游泳圈静态</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="" rel="stylesheet">
<style type="text/css">
*{margin:0;padding: 0;}
body{position: relative; overflow: hidden; background: #ccc;} .youyongquan{
position: relative;
width: 200px;
height: 160px;
padding: 50px 50px 50px 50px;
margin:0 auto;
background: #faf9f9;
border-radius: 50% 50% 50% 50%;
box-shadow:8px 8px 80px 8px #873940 inset;
}
.quan2{
width: 160px;
height: 120px;
margin:0 auto;
background: #faf9f9;
border-radius: 50% 50% 50% 50%;
box-shadow:8px 8px 80px 8px #873940;
}
</style>
</head>
<body>
<div class="youyongquan">
<div class="quan2"></div>
</div>
</body>
</html>
最新文章
- js创建对象的高级模式
- Atitit。数据库 安全性 重要敏感数据加密存储解决方案
- PHP基础知识之函数
- 解决 DotNetCore.1.0.1-VS2015Tools.Preview2.0.3.exe 在VS2015 Update3 安装失败的问题
- 四、Handler(WSGIHandler)
- json分别算出元素的个数和最多的元素
- 一个PHP常用表单验证类(基于正则)
- Excel几个常用操作
- OPEN-E安装中注意的问题
- 纯HTML自动刷新页面或重定向
- How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7
- CentOS7.4+OpenStack-Queens版本部署
- SQLServer存储过程批量删除
- Metasploit AFP信息获取模块afp_server_info
- 程序包需要 NuGet 客户端版本“XXXXX”或更高版本,但当前的 NuGet 版本为“XXXXXXXXXX”
- http与https之间的区别
- 【Redis】Redis cluster集群搭建
- Spring Security构建Rest服务-0300-Restful API异常处理
- spring多线程初探
- FTP原理