---- 淘宝优惠券 ----资源下载 ---域名问题某些图片和js资源无法访问,导致一些代码实例无法运行!(代码里gzui.net换成momen.vip即可)

玻璃拟态

前端开发 蚂蚁 60℃ 0评论

https://mp.weixin.qq.com/s/7-T2Ru3FyJT5xZlYk1UfkQ

代码示例 https://code.juejin.cn/pen/7085536704727089163

Neumorphism: https://neumorphism.io/

Glassmorphism in user interfaces: https://uxdesign.cc/glassmorphism-in-user-interfaces-1f39bb1308c9

.card {
    color: rgba(255, 255, 255, 0.8);
    position: absolute;
    right: 100px;
    bottom: 100px;
    z-index: 10;
    font-family: sans-serif;
    text-align: center;
    width: 300px;
    height: 500px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    background: linear-gradient(
    to top right,
    rgba(90, 149, 207, 0.5),
    rgba(58, 76, 99, 0.8)
    );
    box-shadow: 10px -10px 20px rgba(0, 0, 0, 0.2),
    -10px 10px 20px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px); /*  元素后面区域添加模糊效果 */
    border-radius: 20px;
    transform: rotate(-15deg);
}

设置合适的背景

body {
height: 100vh;
background: radial-gradient(
    circle at 60% 90%,
    rgba(46, 103, 161, 1),
    transparent 60%
  ),
  radial-gradient(
    circle at 20px 20px,
    rgba(46, 103, 161, 0.8),
    transparent 25%
  ),
  #182336;
}

转载请注明:有爱前端 » 玻璃拟态

喜欢 (1)or分享 (0)
发表我的评论
取消评论

表情