当前位置:首页 > 技术博客 > CSS > css立体水滴特效

css立体水滴特效

admin2年前 (2021-10-20)CSS539

立体逼真的水滴移动状态,用作网页背景,ui设计都是不错的选择。蓝色的背景色看着也很养眼,符合主题。

<html>    
<head>    
<meta charset="UTF-8">    
<title>css立体水滴特效</title>    
<style>
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@900&display=swap');
body {
  height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to right, #12c2e9, #c471ed, #f64f59);
  background: #318CFE;
  font-family: 'Montserrat', sans-serif;
}
.c {
  position: relative;
}
.text-c {
  display: grid;
  place-items: center;
  position: relative;
}
h1 {
  position: relative;
  font-size: 72px;
  color: white;
  line-height: 0;
}
.drop {
  position: absolute;
  height: 200px;
  width: 200px;
  background: #54ABFB;
  border-radius: 51% 49% 48% 52% / 62% 44% 56% 38%;
  opacity: 0.8;
  border: 2px solid #3d93ff;
}
.drop::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  background: #318CFE;
  border-radius: 51% 49% 48% 52% / 62% 44% 56% 38%;
  box-shadow: -20px 30px 16px #1B6CFB, -40px 60px 32px #1b6cfb, inset -6px 6px 10px #1B6CFB, inset 2px 6px 10px #1a74e5, inset 20px -20px 22px white, inset 40px -40px 44px #a8ceff;
}
.drop::after {
  content: "";
  position: absolute;
  height: 40px;
  width: 40px;
  background: #E6FDFB;
  border-radius: 44% 56% 46% 54% / 36% 50% 50% 64%;
  left: 130px;
  top: 40px;
  box-shadow: 16px 40px 0 -10px white;
  opacity: 0.8;
}
.drop1 {
  left: -100px;
  top: -50px;
}
.drop2 {
  right: -100px;
  bottom: -50px;
  z-index: -1;
  border-radius: 46% 50% 39% 54% / 56% 57% 50% 50%;
}
.drop2::before {
  border-radius: 46% 50% 39% 54% / 56% 57% 50% 50%;
}
p {
  line-height: 0;
  color: white;
  font-size: 20px;
  font-family: "Montserrat"
}
</style> 
</head>    
<body>    
<div class="c">    
<div class="drop drop1"></div>    
<div class="drop drop2"></div>    
<div class="text-c">    
<h1>WWW.LIUZHIXI.CN</h1>    
<p>专注于WEB开发的工具人</p>    
</div>    
</div>    
</body>    
</html>


版权声明:本文由 LzxBlog 发布,如需转载请注明出处。

本文链接:https://www.liuzhixi.cn/html/199.html

标签: CSS

相关文章

动态的选项卡图标栏svg特效

动态的选项卡图标栏svg特效

使用js css3 svg制作的选项卡图标栏切换特效,点击图标高亮动画切换效果。这是一款可自适应网页的矢量选项卡图标栏代码。body { &nb...

css3悬停卡片3D翻转动画特效

css3悬停卡片3D翻转动画特效

css3卡片和文字翻转切换效果,制作悬停卡片3D翻转特效。<style>     *, *:be...

夜晚云层动画特效

夜晚云层动画特效

基于css3 keyframes 属性制作乌云密布云层动画,夜晚云层飘过动画特效。可用于网页动态云层背景特效。这是利用animation 和png云图片制作完成...

css颜色渐变数值调试

css颜色渐变数值调试

<style> :root {   --color-background: #e8e0fd; &nbs...

炫酷的登录注册表单切换代码

炫酷的登录注册表单切换代码

基于CSS3属性制作创意的登录注册表单样式,酷炫的登录/注册表单ui特效。下载链接: https://pan.baidu.com/s/1hhpCnROFc0gT...

糖果风格的动画按钮

糖果风格的动画按钮

这是一款糖果风格的动画按钮,共 16 个,每个按钮都有不同的渐变色和动画形式。<!DOCTYPE html>  &nb...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。
X 要酷!乐于助人,网络是一个神奇的地方,玩得愉快,击掌