登录页pc适配调试
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="userLayout" :class="['user-layout-wrapper',device]">
|
<div id="userLayout" :class="['user-layout-wrapper',device]">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="top">
|
<div class="top" id="top">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<img id="logo" src="~@/assets/logo.png" alt="">
|
<img id="logo" src="~@/assets/logo.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
* cCompany: 中文公司名
|
* cCompany: 中文公司名
|
||||||
* pCompany: 拼音公司名
|
* pCompany: 拼音公司名
|
||||||
* */
|
* */
|
||||||
let winWidth,company,logo,cCompany,pCompany
|
let winWidth,company,logo,oTop
|
||||||
|
|
||||||
window.onload = ()=>{
|
window.onload = ()=>{
|
||||||
adaptation()
|
adaptation()
|
||||||
@@ -77,23 +77,22 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
function adaptation(){
|
function adaptation(){
|
||||||
winWidth = window.innerWidth
|
winWidth = document.body.clientWidth
|
||||||
|
console.log(winWidth)
|
||||||
|
console.log(document.body.clientHeight)
|
||||||
logo = document.getElementById("logo")
|
logo = document.getElementById("logo")
|
||||||
|
// oTop = document.getElementById("top")
|
||||||
company = document.getElementById("company")
|
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'
|
company.style.height = logo.height + 'px'
|
||||||
|
// oTop.style.height = logo.height + 'px'
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" >
|
<style lang="less" >
|
||||||
#userLayout.user-layout-wrapper{
|
#userLayout.user-layout-wrapper{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
background: #4daaff;
|
||||||
|
overflow: hidden;
|
||||||
.container {
|
.container {
|
||||||
background: #4daaff;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -112,37 +111,35 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
img{
|
img{
|
||||||
display: block;
|
display: block;
|
||||||
max-width:50%;
|
max-width:100%;
|
||||||
min-height: 30px;
|
min-height: 30px;
|
||||||
min-width: 35px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#company{
|
#company{
|
||||||
width: 15%;
|
width: 15%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
max-height: 62px;
|
||||||
|
left: 82px;
|
||||||
|
/*left: calc(100% + 10px);*/
|
||||||
min-height: 30px;
|
min-height: 30px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #000;
|
color: #000;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
position: absolute;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-end;
|
||||||
span{
|
span{
|
||||||
display: block;
|
display: block;
|
||||||
&:first-child{
|
&:first-child{
|
||||||
font-size: 160%;
|
font-size: 160%;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
letter-spacing: 0.5rem;
|
letter-spacing: 0.5rem;
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
}
|
}
|
||||||
&:last-child{
|
&:last-child{
|
||||||
font-size: 10%;
|
font-size: 10%;
|
||||||
letter-spacing: 0.06rem;
|
letter-spacing: 0.06rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -150,9 +147,9 @@
|
|||||||
.illustration{
|
.illustration{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
max-width: 50%;
|
max-width: 50%;
|
||||||
|
max-height: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-width: 400px;
|
min-width: 400px;
|
||||||
position: relative;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -291,6 +291,7 @@
|
|||||||
}
|
}
|
||||||
.main{
|
.main{
|
||||||
.user-layout-login{
|
.user-layout-login{
|
||||||
|
z-index: 99;
|
||||||
width: 24%;
|
width: 24%;
|
||||||
height: 56%;
|
height: 56%;
|
||||||
padding: 3% 0 3% 0;
|
padding: 3% 0 3% 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user