2022年10月26日

html+css 实现气泡

html

  
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
    <style type="text/css">
        
    </style>
</head>
<body>
<div id="div2">
  <div id="div21">
  
  </div>
  </div>
<div id="div3"></div>
  <div id="div4"></div>
  
  <div class="container">
    <div class="pp">
    	<div class="pp1">我的神啊</div>
    </div>
    
    <div class="shadow"></div>
  </div>
</body>
</html>

css 样式

#div2{
            width: 0px;height: 0;
            border: 50px solid white;
            border-bottom-color: lightblue;
  			border-left-color: green;
            border-radius: 50%;
        }
#div21{
  			position:relative;
  			left:-29px;top:-29px;
            width: 0px;height: 0;
            border: 30px solid white;
            border-bottom-color: white;
            border-radius: 50%;
        }
#div3{
            width: 0px;height: 0px;
            border: 50px solid white;
            border-bottom-color: lightblue;
        }

#div4 {
      position: absolute;
      bottom: -50px;
      background: transparent;
      border-radius: 50%;
      pointer-events: none;
      box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5);
      animation: animate 4s linear infinite;

}

*{
    margin: 0;
    padding: 0;
}
body{
    height: 100vh;
    /* 弹性布局 居中显示 */
    display: flex;
    justify-content: center;
    align-items: center;
    /* 渐变背景 */
    background: linear-gradient(150deg,#ffd9e5,#fff0b2,#affffc);
    /* 溢出隐藏 */
    overflow: hidden;
}
.container{
    width: 200px;
    height: 200px;
    /* 相对定位 */
    position: relative;
}
/* 泡泡 */
.pp{
    width: 100%;
    height: 100%;
    /* 径向渐变 */
    background: radial-gradient(circle at 75% 30%,#fff 5px,#ff21c0 8%,#5b5b5b 60%,#ff21c0 100%);
    border-radius: 50%;
    /* 阴影 */
    box-shadow: inset 0 0 20px #fadbe5,
    inset 10px 0 46px #f8c4d5,
    inset 80px 0 60px #c5faf8,
    inset -20px -60px 100px #9cf6f3,
    inset 0 50px 140px #ccfffd,
    0 0 90px #eafefd;
    /* 执行动画:动画名 时长 加速后减速 无限次播放 */
    animation: bubble 5s ease-in-out infinite;
  
}
.pp .pp1{
    color:red;
  	font-size:35px;
  	text-align:center;
  	padding-top:70px;
  	//padding-bottom:50px;
  	//border:1px red solid;
 }
.shadow{
    background-color: rgba(0,0,0,0.15);
    width: 150px;
    height: 40px;
    border-radius: 50%;
    /* 绝对定位 */
    position: absolute;
    left: 50%;
    margin-left: -75px;
    bottom: -100px;
    /* 一点点模糊效果 */
    filter: blur(1px);
    /* 执行动画:动画名 时长 加速后减速 无限次播放 */
    animation: shadow 5s ease infinite;
}

/* 定义动画 */
/* 泡泡浮动动画 */
@keyframes bubble {
    0%{
        transform: translate(0px,0px);
    }
  	
  	50%{
        transform: translate(0px,-100px);
    }
  
  	

    100%{
        transform: translate(0px,0px);
    }

}
/* 投影动画 */
@keyframes shadow {
    0%,100%{
        transform: scale(1);
    }
    50%{
        transform: scale(2);
    }
}


在线运行

posted @ 2022-10-26 10:06 野生小众 阅读(305) 评论(0) 推荐(0) 编辑

2018年4月28日

拼手气红包先领后领相同概率

摘要: 拼手气红包先领后领相同概率 想法就是闭着眼睛切西瓜,刀可以切空,当然要先拿出最低部分,比如10个人分,拿出10*0.01元(最小领1分钱),其他的随便切成相应的份数,每个加上最小备用金1分钱,缺点不适合设置每个红包的最大值,最小值。 这个模型可以解决每个红包大小绝对大小概率相同 /* * 随机分割 阅读全文

posted @ 2018-04-28 00:09 野生小众 阅读(255) 评论(0) 推荐(0) 编辑

2018年4月26日

公钥私钥加密解密

摘要: 加密的内容长度限制为密钥长度少11位,如128位的密钥最多加密的内容为117个长度。 公钥加密 $public_content=file_get_contents(公钥路径); $public_key=openssl_get_publickey($public_content); $original 阅读全文

posted @ 2018-04-26 00:50 野生小众 阅读(1266) 评论(0) 推荐(0) 编辑

2016年12月21日

nginx负载均衡配置

摘要: 同一台服务器上测试: 假设主服务器为localhost:80 代理服务器 localhost:8080 ,localhost:8090 localhost:80niginx 配置修改: a.最简单的反响代理 b.扩展代理 c.访问同以页面负载均衡配置 阅读全文

posted @ 2016-12-21 10:35 野生小众 阅读(126) 评论(0) 推荐(0) 编辑

2016年8月29日

PHP-redis中文文档

摘要: PHP-redis中文文档 phpredis是php的一个扩展,效率是相当高有链表排序功能,对创建内存级的模块业务关系 很有用;以下是redis官方提供的命令使用技巧: 下载地址如下: https://github.com/owlient/phpredis(支持redis 2.0.4) Redis: 阅读全文

posted @ 2016-08-29 14:10 野生小众 阅读(187) 评论(0) 推荐(0) 编辑

2016年7月10日

php的socket通信

摘要: 对TCP/IP、UDP、Socket编程这些词你不会很陌生吧?随着网络技术的发展,这些词充斥着我们的耳朵。那么我想问:1. 什么是TCP/IP、UDP?2. Socket在哪里呢?3. Socket是什么呢?4. 你会使用它们吗?什么是TCP/IP、UDP? TCP/IP(Transmission 阅读全文

posted @ 2016-07-10 22:00 野生小众 阅读(167) 评论(0) 推荐(0) 编辑

mysql 主从配置(master slave)

摘要: mysql主从复制(超简单) 怎么安装mysql数据库,这里不说了,只说它的主从复制,步骤如下: 1、主从服务器分别作以下操作: 1.1、版本一致 1.2、初始化表,并在后台启动mysql 1.3、修改root的密码2、修改主服务器master: #vi /etc/my.cnf [mysqld] l 阅读全文

posted @ 2016-07-10 21:37 野生小众 阅读(335) 评论(0) 推荐(0) 编辑

2015年4月23日

js 乘法除法精度问题

摘要: //返回值:arg1乘以arg2的精确结果function accMul(arg1, arg2) { var m = 0, s1 = arg1.toString(), s2 = arg2.toString(); try { m += s1.split(".")[1].length } c... 阅读全文

posted @ 2015-04-23 19:09 野生小众 阅读(5349) 评论(0) 推荐(0) 编辑

2015年4月2日

jquery 中ajax简单实例,结果返回问题处理

摘要: var ajaxUrl = "index.php";//设置为同步$.ajaxSetup({async: false});$.post(ajaxUrl,{name:name_val},function(data){check_idno(data);},"json");function check_i... 阅读全文

posted @ 2015-04-02 17:11 野生小众 阅读(512) 评论(0) 推荐(0) 编辑

2014年12月2日

php 接口(implement,implements)的学习和使用

摘要: php 接口(implement,implements)的学习和使用 阅读全文

posted @ 2014-12-02 10:59 野生小众 阅读(973) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示