登录页pc适配调试

This commit is contained in:
yaoyanan
2021-03-26 18:33:57 +08:00
parent 71476786c0
commit 930da4650c
2 changed files with 18 additions and 20 deletions
+17 -20
View File
@@ -1,7 +1,7 @@
<template>
<div id="userLayout" :class="['user-layout-wrapper',device]">
<div class="container">
<div class="top">
<div class="top" id="top">
<div class="logo">
<img id="logo" src="~@/assets/logo.png" alt="">
</div>
@@ -43,7 +43,7 @@
* cCompany: 中文公司名
* pCompany: 拼音公司名
* */
let winWidth,company,logo,cCompany,pCompany
let winWidth,company,logo,oTop
window.onload = ()=>{
adaptation()
@@ -77,23 +77,22 @@
}
function adaptation(){
winWidth = window.innerWidth
winWidth = document.body.clientWidth
console.log(winWidth)
console.log(document.body.clientHeight)
logo = document.getElementById("logo")
// oTop = document.getElementById("top")
company = document.getElementById("company")
cCompany = document.getElementById("c-company")
pCompany = document.getElementById("p-company")
cCompany.style.fontSize = (winWidth / 95) + 'px' // 公司中文适配
pCompany.style.fontSize = (winWidth / 120) + 'px' // 公司拼音适配
logo.style.maxWidth = (winWidth * 0.05) +'px' // logo宽度
company.style.left = (winWidth * 0.05 + 5) + 'px' // 公司名字距logo的左偏移
company.style.height = logo.height + 'px'
// oTop.style.height = logo.height + 'px'
}
</script>
<style lang="less" >
#userLayout.user-layout-wrapper{
height: 100%;
background: #4daaff;
overflow: hidden;
.container {
background: #4daaff;
width: 100%;
height: 100%;
position: relative;
@@ -112,37 +111,35 @@
overflow: hidden;
img{
display: block;
max-width:50%;
max-width:100%;
min-height: 30px;
min-width: 35px;
}
}
#company{
width: 15%;
position: absolute;
top: 0;
max-height: 62px;
left: 82px;
/*left: calc(100% + 10px);*/
min-height: 30px;
display: inline-block;
color: #000;
white-space: nowrap;
position: absolute;
display: flex;
flex-direction: column;
justify-content: flex-end;
span{
display: block;
&:first-child{
font-size: 160%;
font-weight: 700;
letter-spacing: 0.5rem;
position: absolute;
top: 0;
left: 0;
}
&:last-child{
font-size: 10%;
letter-spacing: 0.06rem;
font-weight: 700;
position: absolute;
bottom: 0;
left: 0;
}
}
}
@@ -150,9 +147,9 @@
.illustration{
position: absolute;
max-width: 50%;
max-height: 100%;
height: 100%;
min-width: 400px;
position: relative;
display: flex;
justify-content: center;
align-items: center;
+1
View File
@@ -291,6 +291,7 @@
}
.main{
.user-layout-login{
z-index: 99;
width: 24%;
height: 56%;
padding: 3% 0 3% 0;