css布局实现简约线框型音乐app效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现简约线框型音乐app效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
*,
*:after,
*:before {
box-sizing: border-box;
}
:root {
--c-gray-100: #fbf8f2;
--c-gray-200: #fcfdfe;
--c-gray-300: #e9ebec;
--c-gray-400: #e3e4ea;
--c-gray-500: #5f5f5f;
--c-gray-900: #1d1d1d;
--c-blue-300: #a8dee2;
--c-blue-500: #2ab3c0;
--c-green-500: #80b895;
--c-green-300: #bad5ca;
--c-red-500: #ea605e;
--c-yellow-300: #f8e0b1;
--c-yellow-500: #f9bc73;
--rotation: -3deg;
}
body {
font-family: "Urbanist", sans-serif;
line-height: 1.5;
min-height: 100vh;
padding-top: 5vw;
padding-bottom: 5vw;
background-color: var(--c-gray-400);
}
img {
display: block;
max-width: 100%;
}
input,
button {
font: inherit;
}
.phone {
width: 460px;
border-radius: 25px;
overflow: hidden;
padding: 2rem;
box-shadow: 0 0 0 10px var(--c-gray-300), 0 0 0 11px var(--c-gray-200);
background-color: #fff;
position: relative;
z-index: 1;
margin-left: auto;
margin-right: auto;
}
.header {
display: grid;
align-items: center;
justify-content: space-between;
margin-bottom: 1.5rem;
grid-template-columns: 1fr 2fr 1fr;
}
.header-logo {
display: flex;
justify-content: center;
align-items: center;
width: 48px;
height: 48px;
background-color: var(--c-blue-300);
border: 2px solid var(--c-gray-900);
border-radius: 15px;
}
.header-logo div {
display: flex;
flex-wrap: wrap;
width: 24px;
height: 24px;
}
.header-logo span {
display: block;
width: 12px;
height: 12px;
border: 2px solid var(--c-gray-900);
background-color: var(--c-yellow-500);
border-radius: 50%;
}
.header-title {
font-size: 1.25rem;
font-weight: 600;
margin-left: auto;
margin-right: auto;
}
.header-buttons {
display: flex;
align-items: center;
justify-content: flex-end;
}
.notifications {
padding: 0;
border: 0;
background-color: transparent;
margin-right: 1rem;
position: relative;
transform-origin: center center;
transition: 0.15s ease;
cursor: pointer;
}
.notifications:hover, .notifications:focus {
transform: rotate(10deg);
}
.notifications i {
font-size: 1.75rem;
color: #454545;
}
.notifications:after {
right: -8px;
top: 3px;
content: "2";
display: flex;
align-items: center;
justify-content: center;
position: absolute;
width: 20px;
height: 20px;
font-size: 0.75rem;
background-color: var(--c-red-500);
border-radius: 50%;
font-weight: 800;
border: 2px solid var(--c-gray-900);
}
.avatar {
display: flex;
justify-content: center;
align-items: center;
width: 48px;
height: 48px;
padding: 0;
border-radius: 15px;
overflow: hidden;
border: 3px solid #fff;
box-shadow: 0 8px 10px -4px rgba(0, 0, 0, 0.2);
transform-origin: center center;
transition: 0.15s ease;
cursor: pointer;
}
.avatar:hover, .avatar:focus {
transform: translatey(-4px);
box-shadow: 0 12px 14px -4px rgba(0, 0, 0, 0.3);
}
.title {
margin-top: 1rem;
}
.title h1 {
font-size: 1.5rem;
font-weight: 700;
}
.title p {
font-size: 1rem;
color: var(--c-gray-500);
margin-top: 0.375em;
}
.search {
position: relative;
z-index: 1;
transition: 0.15s ease;
}
.search:hover, .search:focus-within {
transform: translatey(-2px);
}
.search-inner {
display: flex;
align-items: center;
border: 2px solid var(--c-gray-900);
border-radius: 15px;
height: 60px;
font-size: 1rem;
width: 100%;
background-color: #fff;
position: relative;
margin-top: 2rem;
}
.search-inner:after {
content: "";
display: block;
position: absolute;
z-index: -1;
width: 96%;
height: 100%;
bottom: -9px;
left: calc(50% - 48%);
border-radius: 20px;
border: 2px solid var(--c-gray-900);
background-color: var(--c-gray-100);
transition: 0.15s ease;
}
.search-inner:hover input::-moz-placeholder, .search-inner:focus-within input::-moz-placeholder {
color: #787878;
}
.search-inner:hover input:-ms-input-placeholder, .search-inner:focus-within input:-ms-input-placeholder {
color: #787878;
}
.search-inner:hover input::placeholder, .search-inner:focus-within input::placeholder {
color: #787878;
}
.search-inner:hover:after, .search-inner:focus-within:after {
transform: translatey(2px);
}
.search-button {
display: flex;
align-items: center;
justify-content: center;
border-radius: 15px 0 0 15px;
border: 0;
background-color: var(--c-gray-100);
position: relative;
height: 100%;
border-right: 2px solid var(--c-gray-900);
width: 70px;
transition: 0.15s ease;
cursor: pointer;
}
.search-button i {
font-size: 1.25em;
}
.search-button:focus, .search-button:hover {
background-color: var(--c-yellow-300);
outline: 0;
}
.search-input {
border: 0;
border-radius: 0 15px 15px 0;
height: 100%;
background-color: #fff;
width: 100%;
padding-left: 1em;
padding-right: 1em;
}
.search-input:focus {
outline: 0;
}
.search-input::-moz-placeholder {
font-weight: 600;
color: var(--c-gray-900);
-moz-transition: 0.15s ease;
transition: 0.15s ease;
}
.search-input:-ms-input-placeholder {
font-weight: 600;
color: var(--c-gray-900);
-ms-transition: 0.15s ease;
transition: 0.15s ease;
}
.search-input::placeholder {
font-weight: 600;
color: var(--c-gray-900);
transition: 0.15s ease;
}
.navigation {
margin-top: 2rem;
padding.........完整代码请登录后点击上方下载按钮下载查看
网友评论0