css实现简洁社交软件ui效果代码
代码语言:html
所属分类:布局界面
代码描述:css实现简洁社交软件ui效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;500&display=swap" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css">
<style>
:root {
--light-blue: rgb(32, 18, 95);
--dark-blue: rgb(204, 100, 223);
--violet: rgb(119, 188, 236);
--background-left: rgb(29, 33, 68);
--background-right: rgb(30, 25, 47);
--conic-gradient: conic-gradient(
var(--dark-blue),
var(--violet),
var(--light-blue),
var(--dark-blue)
);
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes pulse {
from, 20%, 40%, 80%, to {
transform: scale(1);
}
10%, 60% {
transform: scale(1.1);
}
}
body {
background: linear-gradient(
to right,
var(--background-left),
var(--background-right)
);
height: 100vh;
margin: 0px;
overflow: hidden;
padding: 0px;
}
#background {
display: grid;
inset: 0px;
place-items: center;
position: fixed;
z-index: 1;
}
#circle {
animation: rotate 10s linear infinite;
background: var(--conic-gradient);
border-radius: 70vh;
display: grid;
filter: blur(1.5vh);
height: 70vh;
place-items: center;
position: relative;
width: 70vh;
}
#circle-inner {
border-radius: inherit;
inset: 5%;
position: absolute;
}
#circle-glow {
animation: pulse 10s ease-in-out infinite;
background: var(--conic-gradient);
border-radius: 100vh;
filter: blur(3vh);
height: 120%;
opacity: 0.25;
width: 120%;
z-index: 2;
}
#circle-inner {
background: linear-gradient(
to right,
var(--background-left),
var(--background-right)
);
z-index: 3;
}
#app {
display: grid;
height: 100vh;
place-items: center;
position: relative;
width: 100vw;
z-index: 2;
}
#nav {
align-items: center;
display: flex;
height: 100%;
left: 0px;
position: fixed;
top: 0px;
width: 120px;
}
#nav-items {
align-items: center;
display: flex;
flex-direction: column;
gap: 10px;
width: 120px;
}
#nav-items > .nav-item {
border-radius: 6px;
cursor: pointer;
display: grid;
height: 100px;
place-items: center;
transition: background-color 250ms;
width: 100px;
}
#nav-items > .nav-item:hover {
background-color: rgba(255, 255, 255, 0.04);
}
#nav-items > .nav-item:hover > i {
color: rgba(255, 255, 255, 0.9);
}
#nav-items > .nav-item > i {
color: rgba(255, 255, 255, 0.4);
font-size: 2.5em;
transition: color 250ms;
}
#profiles {
display: flex;
flex-wrap: wrap;
gap: clamp(10px, 0.8vw, 20px);
justify-content: center;
margin-left: 120px;
width: clamp(600px, 80vw, 1400px);
}
#profiles > .profile {
aspect-ratio: 7 / 8;
backdrop-filter: blur(0.75vw);
background-color: rgba(255, 255, 255, 0.06);
border-radius: 1vw;
cursor: pointer;
transition: background-color 250ms;
width: calc(25% - clamp(10px, 0.8vw, 20px));
}
#profiles > .profile:hover {
backdrop-filter: blur(1vw);
bac.........完整代码请登录后点击上方下载按钮下载查看
网友评论0