div+css+svg实现支持暗黑亮色模式的遥控器代码
代码语言:html
所属分类:布局界面
代码描述:div+css+svg实现支持暗黑亮色模式的遥控器代码
代码标签: div css svg 暗黑 亮色 模式 遥控器
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
@charset "utf-8";
/* CSS Document */
:root {
--light: #ffffff;
--theme-color: #222222;
--theme-dark: #1f1f1f;
--theme-medium: #333333;
--body-bg: #353535;
--phone-bg: #262626;
}
.light-theme {
--light: #777777;
--theme-color: #f0f0f3;
--theme-dark: #d9d9d9;
--theme-medium: #777777;
--body-bg: #353535;
--phone-bg: #f5f5f5;
}
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap");
* {
margin: 0px;
padding: 0px;
box-sizing: border-box;
}
body {
background: var(--body-bg);
font-size: 16px;
color: var(--light);
font-family: "Nunito", sans-serif;
text-transform: uppercase;
}
h1 {
font-size: 84px;
line-height: 86px;
letter-spacing: 4px;
font-weight: normal;
}
p {
margin-right: -8px;
font-size: 32px;
line-height: 32px;
font-weight: lighter;
letter-spacing: 14px;
}
main {
padding: 15px;
min-height: 100vh;
display: flex;
display: -webkit-flex;
justify-content: center;
-webkit-justify-content: center;
align-items: center;
-webkit-align-items: center;
}
.d-flex {
display: flex;
display: -webkit-flex;
}
.justify-content-center {
justify-content: center;
-webkit-justify-content: center;
}
.align-items-center {
align-items: center;
-webkit-align-items: center;
}
.justify-content-between {
justify-content: space-between;
-webkit-justify-content: space-between;
}
.phone {
width: 375px;
height: 812px;
background: var(--phone-bg);
border: 8px solid var(--theme-dark);
border-radius: 28px;
position: relative;
}
.btn {
width: 56px;
height: 56px;
line-height: 56px;
background: var(--theme-color);
color: var(--light);
border: none;
border-radius: 50%;
cursor: pointer;
display: flex;
display: -webkit-flex;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0