自定义变量--px --笔记
自定义变量
<style lang="scss" scoped>
.Home {
height: 100%;
width: 100%;
.homePage {
height: calc(100% - calc(70 * var(--px)));
width: 100%;
.pageBox,
.pageBoxHide {
height: calc(100% - calc(70 * var(--px)));
width: calc(100% - calc(250 * var(--px)));
position: absolute;
left: calc(250 * var(--px));
background-color: #f0f0f0;
transition: left .3s ease-in-out;
.page {
height: calc(100% - calc(30 * var(--px)));
}
}
.pageBoxHide {
left: calc(30 * var(--px));
width: calc(100% - calc(30 * var(--px)));
}
}
}
</style>
<style>
* {
padding: 0;
margin: 0;
}
html {
height: 100%;
width: 100%;
}
body {
height: 100%;
width: 100%;
font-family: Helvetica, "Microsoft YaHei", sans-serif;
}
a {
text-decoration: none;
}
input {
background-color: rgba(237, 237, 237, 0);
}
input:focus {
outline: 0;
color: #bebebe;
}
button {
outline: none;
border: 0;
cursor: pointer;
}
:root {
--px: 1px;
}
@media all and (max-width: 1440px) {
:root {
--px: 0.75px;
}
}
.__view {
height: 100% !important;
width: 100% !important;
}
</style>