LoginBgImg.js
1.0 KB
import React, { Component } from 'react'
class LoginBgImg extends Component {
constructor(props) {
super(props)
this.state = {
idLoaded: false,
}
}
render() {
const { idLoaded } = this.state
return (
<div style={{position: 'absolute', top: '0px', left: '0px', width: '100%', height: '100%', minWidth: '1300px'}}>
<div style={{ top: '55%', position: 'absolute', left: '35%', marginLeft: '-165px', marginTop: '-200px', width: '368px' }}>
<p style={{ fontSize: '32px', color: '#ffffff', letterSpacing: '2px', fontFamily: 'PingFangSC-Semibold' }}>科技与人力的完美结合</p>
<p style={{ color: '#ffffff', opacity: '0.8', fontFamily: 'Helvetica' }}>The Perfect Combination Of Technology And Human Resources.</p>
</div>
<img style={{display: idLoaded ? 'block' : 'none', width: '100%', height: '100%'}} src={'./img/login_bg_big.png'} alt='背景图' onLoad={()=>{ this.setState({idLoaded: true}) }} />
</div>
)
}
}
export default LoginBgImg