css+js实现mac电脑桌面个人简历主页效果代码
代码语言:html
所属分类:布局界面
代码描述:css+js实现mac电脑桌面个人简历主页效果代码
代码标签: css js mac 电脑 桌面 个人 简历 主页
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.4.0.css">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/swiper-bundle.11.0.4.css">
<style>
@import url("https://fonts.googleapis.com/css2?family=Marhey:wght@400;500;600;700&family=Quicksand:wght@300;400;500;600;700&display=swap");
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: "Quicksand", sans-serif;
}
img {
width: 100%;
pointer-events: none;
user-select: none;
}
ul {
list-style-type: none;
}
h1 {
font-family: "Marhey", sans-serif;
font-size: clamp(1.9rem, 2vw, 3rem);
opacity: 0;
animation: title 1.1s ease 0.3s 1 normal forwards;
}
@keyframes title {
0% {
opacity: 0;
letter-spacing: 10px;
color: #ebeeff;
}
100% {
opacity: 1;
letter-spacing: 0;
color: #fff;
}
}
.hidden {
display: none;
}
html,
body {
position: relative;
height: 100vh;
width: 100%;
background-image: url(//repo.bfw.wiki/bfwrepo/image/661b9112303b8.png);
background-repeat: no-repeat;
background-size: cover;
}
section {
position: relative;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100vh;
}
/* ------------ */
/* ICON STYLES */
.icon-container {
position: absolute;
bottom: 18px;
display: flex;
flex-direction: row;
align-items: center;
gap: 14px;
padding: 10px 14px;
background: rgba(255, 255, 255, 0.4);
box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.24);
border: 1px solid rgba(255, 255, 255, 0.6);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-radius: 12px;
}
.icon-box {
display: flex;
justify-content: center;
align-items: center;
width: 50px;
aspect-ratio: 1/1;
border-radius: 12px;
color: #fff;
font-size: 1.5rem;
padding: 5px;
cursor: pointer;
transition: all 0.4s;
}
.icon-box:hover {
transform: scale(1.1);
}
.about {
background: rgb(182, 164, 248);
background: linear-gradient(
30deg,
rgb(182, 164, 248) 0%,
rgb(75, 52, 159) 70%
);
}
.testimonial {
background-color: #f6c66e;
background-image: linear-gradient(30deg, #f6c66e 0%, rgb(168, 78, 22) 100%);
}
.projects {
background: rgb(169, 207, 124);
background: linear-gradient(
310deg,
rgb(169, 207, 124) 0%,
rgb(77, 120, 31) 60%
);
}
.contact {
background-color: rgb(224, 129, 157);
background-image: linear-gradient(
340deg,
rgb(243, 151, 178) 0%,
rgb(147, 20, 58) 100%
);
}
/* ------- */
/* POPUP */
body.prevent-background-scroll {
min-height: 100dvh;
overflow-y: hidden;
}
.prevent-scroll {
overflow: hidden;
}
#about {
display: block;
}
.popup {
display: none;
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 20;
animation: openPopup 0.6s ease-in-out 1 normal;
}
@keyframes openPopup {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.popup-container {
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
width: min(900px, 90%);
background: rgba(133, 133, 133, 0.2);
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.6);
border-radius: 12px;
color: #fff;
z-index: 30;
transition: all 0.5s ease-in-out;
}
.popup-header {
position: relative;
display: flex;
gap: 8px;
font-weight: 600;
padding: 15px 20px 10px;
font-size: 1.2rem;
}
.popup-body {
color: #f7f7f7;
height: 70vh;
overflow-y: auto;
overflow-x: hidden;
padding: 30px 50px;
}
.popup.maximized .popup-body {
height: 100vh;
}
.button-container {
display: flex;
align-items: center;
column-gap: 8px;
}
.circle-btn {
display: flex;
justify-content: center;
align-items: center;
width: 16px;
aspect-ratio: 1/1;
border-radius: 50%;
border: 0;
outline: 0;
cursor: pointer;
transform: scale(1);
transition: all 0.2s;
}
.circle-btn i {
opacity: 0;
transition: all 0.2s;
font-size: 0.5rem;
color: rgb(65, 66, 67);
}
.circle-btn:hover {
opacity: 1;
transform: scale(1.03);
}
.button-container:hover i {
opacity: 1;
}
/* .button-container:hover i:hover,
.button-container:hover i:hover:nth-child(2),
.button-container:hover i:hover:nth-child(3) {
opacity: 1;
} */
.red {
background-color: rgb(255, 96, 92);
}
.red i {
font-size: 0.8rem;
}
.yellow {
background-color: rgb(255, 189, 68);
}
.yellow i {
transform: translat.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0